Skip to content

Commit

Permalink
from_str is deprecated (See commit descript.)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nathanross committed Jun 11, 2015
1 parent 8371c12 commit f21753e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub extern fn configure(_: &mut WindowManager, w: &WindowSystem, config: &mut Co
config.general.border_color = 0x404040;
config.general.focus_border_color = 0xebebeb;
config.general.border_width = 1;
config.general.terminal = (String::from_str("xterm"), String::from_str(""));
config.general.terminal = (String::from("xterm"), String::from(""));
config.general.layout = LayoutCollection::new(vec!(
GapLayout::new(0, AvoidStrutsLayout::new(vec!(Direction::Up, Direction::Down), BinarySpacePartition::new())),
GapLayout::new(0, AvoidStrutsLayout::new(vec!(Direction::Up, Direction::Down), MirrorLayout::new(BinarySpacePartition::new()))),
Expand All @@ -40,7 +40,7 @@ pub extern fn configure(_: &mut WindowManager, w: &WindowSystem, config: &mut Co
config.general.tags = (vec!("一: ターミナル", "二: ウェブ", "三: コード",
"四: メディア", "五: スチーム", "六: ラテック",
"七: 音楽", "八: im", "九: 残り"))
.into_iter().map(String::from_str).collect();
.into_iter().map(String::from).collect();

// Register key handlers

Expand Down Expand Up @@ -137,14 +137,14 @@ pub extern fn configure(_: &mut WindowManager, w: &WindowSystem, config: &mut Co
} else {
format!("■")
})
.fold(String::from_str(""), |a, x| {
.fold(String::from(""), |a, x| {
let mut r = a.clone();
r.push_str(&x);
r
});

let name = match m.workspaces.peek() {
None => String::from_str(""),
None => String::from(""),
Some(window) => w.get_window_name(window)
};
let content = format!("{} {} {}\n", workspaces, m.workspaces.current.workspace.layout.description(), name);
Expand Down

0 comments on commit f21753e

Please sign in to comment.