From 4cac382412cbb4b4db6b1077fe6d93e5fca348f8 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 27 Dec 2015 17:48:53 +0100 Subject: [PATCH] Fixup Into for Path -> Impl as Into for Path --- src/storage/path.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/storage/path.rs b/src/storage/path.rs index 349eda57..58d8fb05 100644 --- a/src/storage/path.rs +++ b/src/storage/path.rs @@ -81,9 +81,9 @@ impl<'a> Path<'a> { /* * Transform Path into str, so we can call glob() on it */ -impl<'a> Into<&'a str> for Path<'a> { +impl<'a> Into for Path<'a> { - fn into(self) -> &'a str { + fn into(self) -> String { let mut s = self.base.clone(); s.push(self.store.clone()); s.push(self.module.name()); @@ -94,15 +94,15 @@ impl<'a> Into<&'a str> for Path<'a> { s.push("*"); } s.set_extension("imag"); - s.to_str().unwrap_or("") + s.to_str().unwrap_or("").into() } } impl<'a> Into> for Path<'a> { fn into(self) -> Result { - let s : &str = self.into(); - glob(s) + let s : String = self.into(); + glob(&s[..]) } }