Skip to content

Commit c61efad

Browse files
committed
config: don't use as_str()
This should fix build failures on rustc <= 1.6 Signed-off-by: Paul Osborne <[email protected]>
1 parent b340e95 commit c61efad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Into<PinConfig> for RawPinConfig {
5252

5353
impl Decodable for Direction {
5454
fn decode<D: Decoder>(d: &mut D) -> Result<Direction, D::Error> {
55-
match try!(d.read_str()).as_str() {
55+
match &try!(d.read_str())[..] {
5656
"in" => Ok(Direction(sysfs_gpio::Direction::In)),
5757
"out" => Ok(Direction(sysfs_gpio::Direction::Out)),
5858
"high" => Ok(Direction(sysfs_gpio::Direction::High)),

0 commit comments

Comments
 (0)