local-group / rust-escposify

A ESC/POS driver in Rust ( Documentation: https://docs.rs/escposify )
MIT License
53 stars 18 forks source link

Removes the file path from the file object #5

Closed tl8roy closed 7 years ago

tl8roy commented 7 years ago

The filepath serves no purpose in the code so it has been removed. This makes it possible to use tempfile() rather than a pathed one.

Bumps to 0.2 as this is a breaking change

TheWaWaR commented 7 years ago

I think make File._path optional and add function from_fobj maybe better?

pub struct File<W> {
    _path: Option<String>,
    fobj: W
}

pub fn from_fobj(fobj: W) -> File<W> {}
tl8roy commented 7 years ago

I don't have a problem making a non backwards compatible change. Removing it is cleaner and less confusing.

TheWaWaR commented 7 years ago

Looks good, Thanks