summaryrefslogtreecommitdiffstats
path: root/src/options.rs
diff options
context:
space:
mode:
authorSteven Allen <steven@stebalien.com>2015-02-22 12:11:33 -0500
committerSteven Allen <steven@stebalien.com>2015-02-22 12:11:33 -0500
commit2b5406842f597966d4617a124159bc716e5cc5e5 (patch)
treeb655d20f93f241ca87fc0d6fe9891cbffef637f3 /src/options.rs
parent53387122de3851df5e1e38ad2fedc01404568ada (diff)
Get rid of explicit `as_slice()` calls.
Diffstat (limited to 'src/options.rs')
-rw-r--r--src/options.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/options.rs b/src/options.rs
index f5166b0..115a375 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -148,7 +148,7 @@ impl SortField {
/// Find which field to use based on a user-supplied word.
fn from_word(word: String) -> Result<SortField, Misfire> {
- match word.as_slice() {
+ match &word[..] {
"name" | "filename" => Ok(SortField::Name),
"size" | "filesize" => Ok(SortField::Size),
"ext" | "extension" => Ok(SortField::Extension),
@@ -342,7 +342,7 @@ impl TimeTypes {
return Err(Misfire::Useless("accessed", true, "time"));
}
- match word.as_slice() {
+ match &word[..] {
"mod" | "modified" => Ok(TimeTypes { accessed: false, modified: true, created: false }),
"acc" | "accessed" => Ok(TimeTypes { accessed: true, modified: false, created: false }),
"cr" | "created" => Ok(TimeTypes { accessed: false, modified: false, created: true }),