Skip to content

Commit b6b8c49

Browse files
committed
---
yaml --- r: 66414 b: refs/heads/master c: f44b951 h: refs/heads/master v: v3
1 parent 398ea84 commit b6b8c49

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 4f044891a5457acb06338c78f9aa58d8b4c9d53f
2+
refs/heads/master: f44b951a1ea40b61508b2d0abb3f239797f885c5
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/libextra/term.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Terminal {
9797
if s.is_ok() {
9898
self.out.write(s.unwrap());
9999
} else {
100-
warn!(s.unwrap_err());
100+
warn!("%s", s.unwrap_err());
101101
}
102102
}
103103
}
@@ -113,17 +113,20 @@ impl Terminal {
113113
if s.is_ok() {
114114
self.out.write(s.unwrap());
115115
} else {
116-
warn!(s.unwrap_err());
116+
warn!("%s", s.unwrap_err());
117117
}
118118
}
119119
}
120120
pub fn reset(&self) {
121121
let mut vars = Variables::new();
122-
let s = expand(*self.ti.strings.find_equiv(&("op")).unwrap(), [], &mut vars);
122+
let s = do self.ti.strings.find_equiv(&("op"))
123+
.map_consume_default(Err(~"can't find op")) |&op| {
124+
expand(op, [], &mut vars)
125+
};
123126
if s.is_ok() {
124127
self.out.write(s.unwrap());
125128
} else {
126-
warn!(s.unwrap_err());
129+
warn!("%s", s.unwrap_err());
127130
}
128131
}
129132

0 commit comments

Comments
 (0)