Skip to content

Commit f21753e

Browse files
committed
from_str is deprecated (See commit descript.)
Deprecation: rust-lang/rust#24517 nightly gives a warning, depr. status in 1.0.0 release notes: https://github.com/rust-lang/rust/blob/master/RELEASES.md
1 parent 8371c12 commit f21753e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

config/config.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub extern fn configure(_: &mut WindowManager, w: &WindowSystem, config: &mut Co
3131
config.general.border_color = 0x404040;
3232
config.general.focus_border_color = 0xebebeb;
3333
config.general.border_width = 1;
34-
config.general.terminal = (String::from_str("xterm"), String::from_str(""));
34+
config.general.terminal = (String::from("xterm"), String::from(""));
3535
config.general.layout = LayoutCollection::new(vec!(
3636
GapLayout::new(0, AvoidStrutsLayout::new(vec!(Direction::Up, Direction::Down), BinarySpacePartition::new())),
3737
GapLayout::new(0, AvoidStrutsLayout::new(vec!(Direction::Up, Direction::Down), MirrorLayout::new(BinarySpacePartition::new()))),
@@ -40,7 +40,7 @@ pub extern fn configure(_: &mut WindowManager, w: &WindowSystem, config: &mut Co
4040
config.general.tags = (vec!("一: ターミナル", "二: ウェブ", "三: コード",
4141
"四: メディア", "五: スチーム", "六: ラテック",
4242
"七: 音楽", "八: im", "九: 残り"))
43-
.into_iter().map(String::from_str).collect();
43+
.into_iter().map(String::from).collect();
4444

4545
// Register key handlers
4646

@@ -137,14 +137,14 @@ pub extern fn configure(_: &mut WindowManager, w: &WindowSystem, config: &mut Co
137137
} else {
138138
format!("■")
139139
})
140-
.fold(String::from_str(""), |a, x| {
140+
.fold(String::from(""), |a, x| {
141141
let mut r = a.clone();
142142
r.push_str(&x);
143143
r
144144
});
145145

146146
let name = match m.workspaces.peek() {
147-
None => String::from_str(""),
147+
None => String::from(""),
148148
Some(window) => w.get_window_name(window)
149149
};
150150
let content = format!("{} {} {}\n", workspaces, m.workspaces.current.workspace.layout.description(), name);

0 commit comments

Comments
 (0)