Skip to content

Commit 30bf919

Browse files
committed
---
yaml --- r: 151675 b: refs/heads/try2 c: ded860c h: refs/heads/master i: 151673: e54533a 151671: abe1719 v: v3
1 parent f9b8853 commit 30bf919

File tree

6 files changed

+121
-94
lines changed

6 files changed

+121
-94
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 93499b1eaf74a58ff7de3ac9240afc4796ef57c8
8+
refs/heads/try2: ded860c0e89e6f33dece7f65bb71419b515314eb
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libterm/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,12 @@ impl<T: Writer> Terminal<T> {
126126
/// Returns `Err()` on failure to open the terminfo database correctly.
127127
/// Also, in the event that the individual terminfo database entry can not
128128
/// be parsed.
129-
pub fn new(out: T) -> Result<Terminal<T>, ~str> {
129+
pub fn new(out: T) -> Result<Terminal<T>, StrBuf> {
130130
let term = match os::getenv("TERM") {
131131
Some(t) => t,
132-
None => return Err("TERM environment variable undefined".to_owned())
132+
None => {
133+
return Err("TERM environment variable undefined".to_strbuf())
134+
}
133135
};
134136

135137
let mut file = match open(term) {
@@ -251,7 +253,8 @@ impl<T: Writer> Terminal<T> {
251253
cap = self.ti.strings.find_equiv(&("op"));
252254
}
253255
}
254-
let s = cap.map_or(Err("can't find terminfo capability `sgr0`".to_owned()), |op| {
256+
let s = cap.map_or(Err("can't find terminfo capability \
257+
`sgr0`".to_strbuf()), |op| {
255258
expand(op.as_slice(), [], &mut Variables::new())
256259
});
257260
if s.is_ok() {

branches/try2/src/libterm/terminfo/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ use collections::HashMap;
1515
/// A parsed terminfo database entry.
1616
pub struct TermInfo {
1717
/// Names for the terminal
18-
pub names: Vec<~str> ,
18+
pub names: Vec<StrBuf> ,
1919
/// Map of capability name to boolean value
20-
pub bools: HashMap<~str, bool>,
20+
pub bools: HashMap<StrBuf, bool>,
2121
/// Map of capability name to numeric value
22-
pub numbers: HashMap<~str, u16>,
22+
pub numbers: HashMap<StrBuf, u16>,
2323
/// Map of capability name to raw (unexpanded) string
24-
pub strings: HashMap<~str, Vec<u8> >
24+
pub strings: HashMap<StrBuf, Vec<u8> >
2525
}
2626

2727
pub mod searcher;

0 commit comments

Comments
 (0)