From 5c9d1775d7f479efcafb5712231e2032505651e0 Mon Sep 17 00:00:00 2001 From: Alexander Korolev Date: Sat, 14 Sep 2019 11:37:42 +0200 Subject: [PATCH] warnings, disable bsd target --- .travis.yml | 2 +- src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5bbe47f..6fc09c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,7 +60,7 @@ matrix: os: osx # *BSD - - env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1 + #- env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1 #- env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1 #- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1 diff --git a/src/lib.rs b/src/lib.rs index 8d77f68..af74601 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -598,7 +598,7 @@ impl<'a> MercurialRepo<'a> { ); } - let prefix = strip_leading_slash(self.config.path_prefix.as_ref(), &"".into()); + let prefix = strip_leading_slash(self.config.path_prefix.as_ref(), ""); for file in &mut changeset.files { match (&mut file.data, &mut file.manifest_entry) { (None, None) => { @@ -660,7 +660,7 @@ impl<'a> MercurialRepo<'a> { } } -fn strip_leading_slash(prefix: Option<&String>, x: &String) -> String { +fn strip_leading_slash(prefix: Option<&String>, x: &str) -> String { prefix.map_or_else(|| x.to_string(), |p| format!("{}/{}", p, x)) }