diff options
| author | krolxon <krolyxon@tutanota.com> | 2024-06-04 15:24:36 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2024-06-04 15:24:36 +0530 |
| commit | 53522c936d6c43e700247eb74f26389eb52882de (patch) | |
| tree | 0caf646655c88db896fdd54664c4d4d031fdf322 /src | |
| parent | a2f44eb6e6b6ac3fca22acc3f2947cc45fd621a3 (diff) | |
change String to &str in get_full_path()
Diffstat (limited to 'src')
| -rwxr-xr-x | src/connection.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/connection.rs b/src/connection.rs index 6d48080..c31c346 100755 --- a/src/connection.rs +++ b/src/connection.rs @@ -157,10 +157,10 @@ impl Connection { } /// Given a song name from a directory, it returns the full path of the song in the database - pub fn get_full_path(&self, short_path: &str) -> Option<String> { + pub fn get_full_path(&self, short_path: &str) -> Option<&str> { for (i, f) in self.songs_filenames.iter().enumerate() { if f.contains(short_path) { - return Some(self.songs_filenames.get(i).unwrap().to_string()); + return Some(self.songs_filenames.get(i).unwrap()); } } None |
