aboutsummaryrefslogtreecommitdiff
path: root/src/deck.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/deck.rs')
-rw-r--r--src/deck.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/deck.rs b/src/deck.rs
index 3524c96..e0f9fab 100644
--- a/src/deck.rs
+++ b/src/deck.rs
@@ -23,7 +23,7 @@ impl std::error::Error for ParseError {
}
}
-pub fn read(deck: &String) -> Result<Vec<Entry>> {
+pub fn read(deck: &str) -> Result<Vec<Entry>> {
let file = File::open(deck)?;
let reader = BufReader::new(file);
let mut entries: Vec<Entry> = Vec::new();
@@ -69,7 +69,9 @@ pub fn read(deck: &String) -> Result<Vec<Entry>> {
}
pub fn pp_from_path(path: &String) -> Option<String> {
- Some(capitalize(Path::new(&path).with_extension("").file_name()?.to_str()?))
+ Some(capitalize(
+ Path::new(&path).with_extension("").file_name()?.to_str()?,
+ ))
}
fn capitalize(s: &str) -> String {