Skip to content

Commit

Permalink
Update to Rust 2018
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrosland committed Nov 26, 2019
1 parent ecf1385 commit 13f72e0
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 20 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ categories = [ "hardware-support" ]
keywords = [ "camera", "raspberry", "pi", "rpi" ]
exclude = [ "ci/*" ]
build = "build.rs"
edition = "2018"

[dependencies]
mmal-sys = "0.1.0-2"
Expand All @@ -24,3 +25,6 @@ default = []

# Enable this feature to enable some print statements for debugging.
debug = []

[package.metadata.docs.rs]
default-target = "armv7-unknown-linux-gnueabihf"
2 changes: 0 additions & 2 deletions examples/serious.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate rascam;

use std::fs::File;
use std::io::Write;
use std::{thread, time};
Expand Down
2 changes: 0 additions & 2 deletions examples/simple.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate rascam;

use std::fs::File;
use std::io::Write;
use std::{thread, time};
Expand Down
2 changes: 0 additions & 2 deletions examples/stress.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate rascam;

use std::{thread, time};
use rascam::*;

Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern crate mmal_sys as ffi;
use std::error;
use mmal_sys as ffi;
use ffi::MMAL_STATUS_T;
use std::error;
use std::fmt;
use std::sync::mpsc;
use std::io;
Expand Down
7 changes: 3 additions & 4 deletions src/info.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
extern crate mmal_sys as ffi;

use mmal_sys as ffi;
use ffi::MMAL_STATUS_T;
use std::fmt;
use std::os::raw::c_char;
use std::ffi::CStr;
use std::mem;
use std::string::String;

use init::init;
use error::{CameraError, MmalError};
use crate::init::init;
use crate::error::{CameraError, MmalError};

/// Contains information about attached cameras.
pub struct Info {
Expand Down
3 changes: 1 addition & 2 deletions src/init.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
extern crate mmal_sys as ffi;

use mmal_sys as ffi;
use std::sync::Once;

/// This function must be called before any mmal work. Failure to do so will cause errors like:
Expand Down
6 changes: 1 addition & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
//!
//! [mmal-sys]: https://crates.io/crates/mmal-sys
extern crate libc;
extern crate mmal_sys as ffi;
extern crate parking_lot;
extern crate lock_api;
use mmal_sys as ffi;
#[macro_use(defer_on_unwind)]
extern crate scopeguard;
// extern crate futures;
use ffi::MMAL_STATUS_T;
use std::os::raw::c_char;
use std::ffi::CStr;
Expand Down
2 changes: 1 addition & 1 deletion src/settings.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate mmal_sys as ffi;
use mmal_sys as ffi;

use std::os::raw::c_uint;

Expand Down

0 comments on commit 13f72e0

Please sign in to comment.