Skip to content

Commit 67e77b2

Browse files
hamirmahalsharkdp
authored andcommitted
refactor: replace strings with single characters
1 parent 376b51e commit 67e77b2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

numbat-cli/src/completer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ impl Completer for NumbatCompleter {
7777
// does it look like we're tab-completing a timezone (via the conversion operator)?
7878
let complete_tz = line
7979
.find("->")
80-
.or_else(|| line.find("→"))
81-
.or_else(|| line.find("➞"))
80+
.or_else(|| line.find('→'))
81+
.or_else(|| line.find('➞'))
8282
.or_else(|| line.find(" to "))
8383
.and_then(|convert_pos| {
8484
if let Some(quote_pos) = line.rfind('"') {

numbat/src/module_importer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl ModuleImporter for BuiltinModuleImporter {
121121
.map(|path| {
122122
ModulePath(
123123
path.trim_end_matches(".nbt")
124-
.split("/")
124+
.split('/')
125125
.map(|s| s.to_string())
126126
.collect(),
127127
)

numbat/src/number.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl Number {
6969
formatted_number.to_string()
7070
}
7171
} else if formatted_number.contains('e') && !formatted_number.contains("e-") {
72-
formatted_number.replace("e", "e+")
72+
formatted_number.replace('e', "e+")
7373
} else {
7474
formatted_number
7575
}

0 commit comments

Comments
 (0)