Skip to content

Commit

Permalink
please Clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
  • Loading branch information
fenollp authored and canselcik committed Nov 28, 2020
1 parent a809f25 commit 3aeaa21
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/live.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use libremarkable::framebuffer::common::{DISPLAYHEIGHT, DISPLAYWIDTH};
/// An HTTP server that listens on :8000 and responds to all incoming requests
/// with the full contents of the framebuffer properly exported as a JPEG.
fn main() {
let fb = Framebuffer::new("/dev/fb0");
let fb = Framebuffer::from_path("/dev/fb0");
println!("libremarkable Framebuffer device initialized");

let server = Server::http("0.0.0.0:8000").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/appctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl<'a> ApplicationContext<'a> {
on_wacom: fn(&mut ApplicationContext<'_>, WacomEvent),
on_touch: fn(&mut ApplicationContext<'_>, MultitouchEvent),
) -> ApplicationContext<'static> {
let framebuffer = Box::new(core::Framebuffer::new("/dev/fb0"));
let framebuffer = Box::new(core::Framebuffer::from_path("/dev/fb0"));
let yres = framebuffer.var_screen_info.yres;
let xres = framebuffer.var_screen_info.xres;

Expand Down
2 changes: 1 addition & 1 deletion src/framebuffer/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ unsafe impl<'a> Send for Framebuffer<'a> {}
unsafe impl<'a> Sync for Framebuffer<'a> {}

impl<'a> framebuffer::FramebufferBase<'a> for Framebuffer<'a> {
fn new(path_to_device: &str) -> Framebuffer<'_> {
fn from_path(path_to_device: &str) -> Framebuffer<'_> {
let device = OpenOptions::new()
.read(true)
.write(true)
Expand Down
2 changes: 1 addition & 1 deletion src/framebuffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub trait FramebufferDraw {
pub mod core;
pub trait FramebufferBase<'a> {
/// Creates a new instance of Framebuffer
fn new(path_to_device: &str) -> core::Framebuffer<'_>;
fn from_path(path_to_device: &str) -> core::Framebuffer<'_>;
/// Toggles the EPD Controller (see https://wiki.mobileread.com/wiki/EPD_controller)
fn set_epdc_access(&mut self, state: bool);
/// Toggles autoupdate mode
Expand Down

0 comments on commit 3aeaa21

Please sign in to comment.