diff options
Diffstat (limited to 'src/libsyntax/ext/pipes/proto.rs')
| -rw-r--r-- | src/libsyntax/ext/pipes/proto.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ext/pipes/proto.rs b/src/libsyntax/ext/pipes/proto.rs index 7c78ec066d0..f897eb787e5 100644 --- a/src/libsyntax/ext/pipes/proto.rs +++ b/src/libsyntax/ext/pipes/proto.rs @@ -154,14 +154,14 @@ pub struct protocol_ { pub impl protocol_ { /// Get a state. - fn get_state(&self, name: ~str) -> state { - self.states.find(|i| i.name == name).get() + fn get_state(&self, name: &str) -> state { + self.states.find(|i| name == i.name).get() } fn get_state_by_id(&self, id: uint) -> state { self.states[id] } - fn has_state(&self, name: ~str) -> bool { - self.states.find(|i| i.name == name).is_some() + fn has_state(&self, name: &str) -> bool { + self.states.find(|i| name == i.name).is_some() } fn filename(&self) -> ~str { |
