Bustage fix: Build against Rust 1.25.

This commit is contained in:
Nick Alexander 2018-06-13 09:45:15 -07:00 committed by Nick Alexander
parent 8cc0e5a64e
commit f041dfe509
2 changed files with 8 additions and 8 deletions

View file

@ -90,7 +90,7 @@ pub fn run() -> i32 {
match last_arg {
Some("-d") => {
last_arg = None;
if let Some(k) = &key {
if let &Some(ref k) = &key {
Some(command_parser::Command::OpenEncrypted(arg.clone(), k.clone()))
} else {
Some(command_parser::Command::Open(arg.clone()))

View file

@ -407,22 +407,22 @@ impl Repl {
Ok(())
}
fn open(&mut self, path: impl Into<String>) -> ::mentat::errors::Result<()> {
fn open<T>(&mut self, path: T) -> ::mentat::errors::Result<()> where T: Into<String> {
self.open_common(false, path.into(), None)
}
fn open_empty(&mut self, path: impl Into<String>)
-> ::mentat::errors::Result<()> {
fn open_empty<T>(&mut self, path: T)
-> ::mentat::errors::Result<()> where T: Into<String> {
self.open_common(true, path.into(), None)
}
fn open_with_key(&mut self, path: impl Into<String>, encryption_key: impl AsRef<str>)
-> ::mentat::errors::Result<()> {
fn open_with_key<T, U>(&mut self, path: T, encryption_key: U)
-> ::mentat::errors::Result<()> where T: Into<String>, U: AsRef<str> {
self.open_common(false, path.into(), Some(encryption_key.as_ref()))
}
fn open_empty_with_key(&mut self, path: impl Into<String>, encryption_key: impl AsRef<str>)
-> ::mentat::errors::Result<()> {
fn open_empty_with_key<T, U>(&mut self, path: T, encryption_key: U)
-> ::mentat::errors::Result<()> where T: Into<String>, U: AsRef<str> {
self.open_common(true, path.into(), Some(encryption_key.as_ref()))
}