diff options
Diffstat (limited to 'src/libterm/terminfo/parm.rs')
| -rw-r--r-- | src/libterm/terminfo/parm.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libterm/terminfo/parm.rs b/src/libterm/terminfo/parm.rs index 4173744ab4b..016dc84b23b 100644 --- a/src/libterm/terminfo/parm.rs +++ b/src/libterm/terminfo/parm.rs @@ -257,7 +257,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables) let flags = Flags::new(); let res = format(stack.pop().unwrap(), FormatOp::from_char(cur), flags); if res.is_err() { return res } - output.push_all(res.unwrap().as_slice()) + output.push_all(&res.unwrap()) } else { return Err("stack is empty".to_string()) }, ':'|'#'|' '|'.'|'0'...'9' => { let mut flags = Flags::new(); @@ -355,7 +355,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables) (_,'d')|(_,'o')|(_,'x')|(_,'X')|(_,'s') => if stack.len() > 0 { let res = format(stack.pop().unwrap(), FormatOp::from_char(cur), *flags); if res.is_err() { return res } - output.push_all(res.unwrap().as_slice()); + output.push_all(&res.unwrap()); // will cause state to go to Nothing old_state = FormatPattern(*flags, *fstate); } else { return Err("stack is empty".to_string()) }, @@ -609,7 +609,7 @@ mod test { { let mut u8v: Vec<_> = fmt.bytes().collect(); u8v.extend(cap.as_bytes().iter().map(|&b| b)); - expand(u8v.as_slice(), params, vars) + expand(&u8v, params, vars) } let caps = ["%d", "%c", "%s", "%Pa", "%l", "%!", "%~"]; |
