Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
95th committed Aug 24, 2019
1 parent ce8227e commit 1ceddc4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bencode/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use error::{Error, Result};
use std::collections::BTreeMap;
use std::fmt;
use std::io;
use std::io::Cursor;
use error::{Error, Result};

pub mod error;

Expand Down Expand Up @@ -137,10 +137,7 @@ enum Token<'a> {
}

impl Value {
pub fn encode<W>(&self, w: &mut W) -> io::Result<()>
where
W: io::Write,
{
pub fn encode<W: io::Write>(&self, w: &mut W) -> io::Result<()> {
use Token::*;
use Value::*;
let mut stack = vec![B(self)];
Expand Down

0 comments on commit 1ceddc4

Please sign in to comment.