Skip to content

Commit dac9411

Browse files
committed
edition = 2018
1 parent be7b547 commit dac9411

File tree

9 files changed

+10
-20
lines changed

9 files changed

+10
-20
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ readme = "README.md"
1111
repository = "https://github.com/FauxFaux/apt-pkg-native-rs"
1212
version = "0.3.0"
1313

14+
edition = "2018"
15+
1416
[badges.travis-ci]
1517
repository = "FauxFaux/apt-pkg-native-rs"
1618

examples/epochs.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
extern crate apt_pkg_native;
2-
extern crate boolinator;
3-
41
use apt_pkg_native::Cache;
52

63
use boolinator::Boolinator;

examples/list.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
extern crate apt_pkg_native;
2-
extern crate itertools;
3-
41
use itertools::Itertools;
52

63
use apt_pkg_native::simple;

examples/policy.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
extern crate apt_pkg_native;
21
use std::env;
32

43
use apt_pkg_native::simple;

examples/sources.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::collections::HashMap;
2+
use std::collections::HashSet;
13
/// A port of a randomly selected Python program:
24
///
35
/// ```python
@@ -23,12 +25,8 @@
2325
/// for ver in sorted(sources[src]):
2426
/// print('{}={}'.format(src, ver))
2527
/// ```
26-
extern crate apt_pkg_native;
2728
use std::env;
2829

29-
use std::collections::HashMap;
30-
use std::collections::HashSet;
31-
3230
use apt_pkg_native::Cache;
3331

3432
fn main() {

src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,12 @@
3131
//! `libapt-pkg` also just segfaults if you do anything wrong, or re-use anything at the wrong time,
3232
//! or etc. I've tried to hide this, but I advise you not to push or outsmart the borrow checker.
3333
34-
#[macro_use]
35-
extern crate lazy_static;
36-
extern crate libc;
37-
3834
mod citer;
3935
mod raw;
4036
mod sane;
4137
pub mod simple;
4238

43-
pub use sane::Cache;
39+
pub use crate::sane::Cache;
4440

4541
#[cfg(test)]
4642
mod tests {

src/raw.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/// * `*mut c_chars` are to be freed by `libc::free`.
55
use std::sync::Mutex;
66

7+
use lazy_static::lazy_static;
78
use libc::c_char;
89
use libc::c_void;
910

src/sane.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use std::marker::PhantomData;
44
use std::sync::MutexGuard;
55

66
use libc;
7-
use raw;
87

9-
use citer::CIterator;
10-
use citer::RawIterator;
8+
use crate::citer::CIterator;
9+
use crate::citer::RawIterator;
10+
use crate::raw;
1111

1212
/// A reference to the package cache singleton,
1313
/// from which most functionality can be accessed.

src/simple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use std::fmt;
44

5-
use sane;
5+
use crate::sane;
66

77
#[derive(Clone, Debug)]
88
pub struct BinaryPackage {

0 commit comments

Comments
 (0)