Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit 7abe634

Browse files
committed
Fix use statements
1 parent c6ffec4 commit 7abe634

File tree

7 files changed

+12
-16
lines changed

7 files changed

+12
-16
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ links = "ffmpeg"
66
readme = "README.md"
77
authors = ["meh. <meh@schizofreni.co>"]
88
license = "WTFPL"
9+
edition = "2018"
910

1011
description = "FFI bindings to FFmpeg"
1112
repository = "https://github.com/meh/rust-ffmpeg-sys"

build.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
extern crate bindgen;
2-
extern crate cc;
3-
extern crate num_cpus;
4-
extern crate pkg_config;
51

62
use std::env;
73
use std::fs::{self, File};

src/avutil/error.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use libc::{c_char, c_int, size_t};
1+
use std::os::raw::{c_char, c_int};
22

33
// Note: FFmpeg's AVERROR and AVUNERROR are conditionally defined based on
44
// whether EDOM is positive, claiming that "Some platforms have E* and errno
@@ -55,7 +55,7 @@ pub const AVERROR_HTTP_SERVER_ERROR: c_int = FFERRTAG!(0xF8, b'5', b'X', b'X');
5555
#[inline(always)]
5656
pub unsafe fn av_make_error_string(
5757
errbuf: *mut c_char,
58-
errbuf_size: size_t,
58+
errbuf_size: usize,
5959
errnum: c_int,
6060
) -> *mut c_char {
6161
av_strerror(errnum, errbuf, errbuf_size);
@@ -64,5 +64,5 @@ pub unsafe fn av_make_error_string(
6464
}
6565

6666
extern "C" {
67-
pub fn av_strerror(errnum: c_int, errbuf: *mut c_char, errbuf_size: size_t) -> c_int;
67+
pub fn av_strerror(errnum: c_int, errbuf: *mut c_char, errbuf_size: usize) -> c_int;
6868
}

src/avutil/pixfmt.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use AVPixelFormat;
2-
use AVPixelFormat::*;
1+
use crate::AVPixelFormat;
2+
use crate::AVPixelFormat::*;
33

44
#[cfg(target_endian = "little")]
55
pub const AV_PIX_FMT_RGB32: AVPixelFormat = AV_PIX_FMT_BGRA;

src/avutil/rational.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use libc::{c_double, c_int};
2-
use AVRational;
1+
use crate::AVRational;
2+
use std::os::raw::c_int;
33

44
#[inline(always)]
55
pub unsafe fn av_make_q(num: c_int, den: c_int) -> AVRational {
@@ -22,7 +22,7 @@ pub unsafe fn av_cmp_q(a: AVRational, b: AVRational) -> c_int {
2222
}
2323

2424
#[inline(always)]
25-
pub unsafe fn av_q2d(a: AVRational) -> c_double {
25+
pub unsafe fn av_q2d(a: AVRational) -> f64 {
2626
f64::from(a.num) / f64::from(a.den)
2727
}
2828

src/avutil/util.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
use libc::c_int;
2-
use {AVRational, AV_TIME_BASE};
1+
use crate::{AVRational, AV_TIME_BASE};
32

43
pub const AV_NOPTS_VALUE: i64 = 0x8000000000000000u64 as i64;
54
pub const AV_TIME_BASE_Q: AVRational = AVRational {
65
num: 1,
7-
den: AV_TIME_BASE as c_int,
6+
den: AV_TIME_BASE as _,
87
};

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
1212

1313
#[macro_use]
1414
mod avutil;
15-
pub use avutil::*;
15+
pub use crate::avutil::*;

0 commit comments

Comments
 (0)