Skip to content

Commit d28f9e7

Browse files
Update bindgen requirement from 0.60.1 to 0.61.0 (#84)
* Update bindgen requirement from 0.60.1 to 0.61.0 Updates the requirements on [bindgen](https://github.com/rust-lang/rust-bindgen) to permit the latest version. - [Release notes](https://github.com/rust-lang/rust-bindgen/releases) - [Changelog](https://github.com/rust-lang/rust-bindgen/blob/master/CHANGELOG.md) - [Commits](rust-lang/rust-bindgen@v0.60.1...v0.61.0) --- updated-dependencies: - dependency-name: bindgen dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Remove unneeded casts Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew Mackenzie <[email protected]>
1 parent 3077f46 commit d28f9e7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ name = "dmesg"
3131
path = "src/dmesg.rs"
3232

3333
[build-dependencies]
34-
bindgen = { version = "0.60.1", default-features = false, features = ["runtime"] }
34+
bindgen = { version = "0.61.0", default-features = false, features = ["runtime"] }

src/libproc/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::io::{BufRead, BufReader};
88
/// number and a possible message
99
pub fn get_errno_with_message(return_code: i32) -> String {
1010
let e = errno();
11-
let code = e.0 as i32;
11+
let code = e.0;
1212
format!("return code = {}, errno = {}, message = '{}'", return_code, code, e)
1313
}
1414

src/libproc/proc_pid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pub fn listpids(proc_types: ProcType) -> Result<Vec<u32>, String> {
168168
let mut pids: Vec<u32> = Vec::with_capacity(capacity);
169169
let buffer_ptr = pids.as_mut_ptr() as *mut c_void;
170170

171-
let ret = unsafe { proc_listpids(proc_types as u32, 0, buffer_ptr, buffer_size as i32) };
171+
let ret = unsafe { proc_listpids(proc_types as u32, 0, buffer_ptr, buffer_size) };
172172

173173
if ret <= 0 {
174174
Err(helpers::get_errno_with_message(ret))
@@ -246,7 +246,7 @@ pub fn listpidspath(proc_types: ProcType, path: &str) -> Result<Vec<u32>, String
246246
c_path.as_ptr() as *const c_char,
247247
0,
248248
buffer_ptr,
249-
buffer_size as i32,
249+
buffer_size,
250250
)
251251
};
252252

0 commit comments

Comments
 (0)