search for: unused_import

Displaying 5 results from an estimated 5 matches for "unused_import".

Did you mean: unused_imports
2019 Jul 08
0
Re: [libnbd PATCH] RFC: Add bindings for Rust language
...nbd itself and the releases > (especially the numbers) do not need to happen in sync. I also didn't understand what this means. It's a matter of personal preference but you can use multi-line string constants in OCaml which can be unlimited in length, so this: > + pr "#[allow(unused_imports)]\n"; > + pr "use std::os::raw::{c_char, c_int, c_uint, c_void};\n"; > + pr "use std::os::unix::io::RawFd;\n"; > + pr "use std::ffi::CStr;\n"; > + pr "use libnbd_sys::*;\n"; > + pr "use libc;\n"; > + pr "\n";...
2019 Jul 08
2
Re: [libnbd PATCH] RFC: Add bindings for Rust language
...> (especially the numbers) do not need to happen in sync. > >I also didn't understand what this means. > >It's a matter of personal preference but you can use multi-line string >constants in OCaml which can be unlimited in length, so this: > >> + pr "#[allow(unused_imports)]\n"; >> + pr "use std::os::raw::{c_char, c_int, c_uint, c_void};\n"; >> + pr "use std::os::unix::io::RawFd;\n"; >> + pr "use std::ffi::CStr;\n"; >> + pr "use libnbd_sys::*;\n"; >> + pr "use libc;\n"; >&gt...
2019 Jul 07
2
[libnbd PATCH] RFC: Add bindings for Rust language
...har" + in + + (* TODO: print shortdesc and longdesc *) + pr " pub fn nbd_%s" name; + print_rust_ffi_arg_list ~handle:true 2 args; + pr " -> %s;\n" ret_rs_type + in + + generate_header CStyle; + + (* TODO: global documentation *) + + pr "#[allow(unused_imports)]\n"; + pr "use std::os::raw::{c_char, c_int, c_uint, c_void};\n"; + pr "\n"; + + (* TODO: print constants *) + (* TODO: print constants for metadata namespaces *) + + pr "#[link(name = \"nbd\")]"; + pr "extern \"C\" {\n"; + p...
2019 Jul 08
1
Re: [libnbd PATCH] RFC: Add bindings for Rust language
...ed. > >I'm a bit unclear what "strings" (above) and "substrings" means in >this context. Do you mean actual string constants? > No, I mean the strings printed by the generator, e.g. the one from your example on how to use a multiline one: pr "\ #[allow(unused_imports)] use std::os::raw::{c_char, c_int, c_uint, c_void}; use std::os::unix::io::RawFd; [...] "; >Rich. > >-- >Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones >Read my programming and virtualization blog: http://rwmj.wordpress.com >virt-top is '...
2019 Aug 31
1
[PATCH libnbd] Add bindings for Rust language
Still not working, but I took the latest patch and: - rebased it against libnbd 1.0 - fixed it so it handles new args and cbargs The generator now runs without warnings. This patch doesn't handle optargs at all. In C these are converted to non-optional parameter. Rust doesn't (AFAIK) have optional or labelled arguments unfortunately. Rich.