Skip to content

Instantly share code, notes, and snippets.

@wizard-28
Created May 2, 2022 17:50
Show Gist options
  • Save wizard-28/8750ca48b68df3ac557a9c6ef1b6f638 to your computer and use it in GitHub Desktop.
Save wizard-28/8750ca48b68df3ac557a9c6ef1b6f638 to your computer and use it in GitHub Desktop.
Checking rust-apt v0.1.0 (/workspace/rust-apt)
warning: unused import: `HashMap`
--> src/cache.rs:4:34
|
4 | use std::collections::{BTreeMap, HashMap};
| ^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused imports: `IndexMut`, `Index`
--> src/cache.rs:8:16
|
8 | use std::ops::{Index, IndexMut};
| ^^^^^ ^^^^^^^^
warning: unused import: `std::sync::Arc`
--> src/cache.rs:9:5
|
9 | use std::sync::Arc;
| ^^^^^^^^^^^^^^
warning: redundant field names in struct initialization
--> src/cache.rs:39:5
|
39 | _cache: _cache,
| ^^^^^^^^^^^^^^ help: replace it with: `_cache`
|
= note: `#[warn(clippy::redundant_field_names)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
warning: redundant field names in struct initialization
--> src/cache.rs:186:5
|
186 | cache: cache,
| ^^^^^^^^^^^^ help: replace it with: `cache`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
warning: you should put bare URLs between `<`/`>` or make a proper Markdown link
--> src/lib.rs:4:30
|
4 | //! The source repository is https://gitlab.com/volian/rust-apt
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
warning: docs for function which may panic missing `# Panics` section
--> src/cache.rs:33:2
|
33 | / pub fn new(_cache: *mut apt::PCache, pkg_ptr: *mut apt::PPkgIterator) -> Package<'a> {
34 | | unsafe {
35 | | Package {
36 | | // Get a new pointer for the package
... |
45 | | }
46 | | }
| |_____^
|
= note: `-W clippy::missing-panics-doc` implied by `-W clippy::pedantic`
note: first possible panic found here
--> src/cache.rs:41:11
|
41 | arch: raw::own_string(apt::pkg_arch(pkg_ptr)).unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
error: this public function might dereference a raw pointer but is not marked `unsafe`
--> src/cache.rs:37:29
|
37 | pkg_ptr: apt::pkg_clone(pkg_ptr),
| ^^^^^^^
|
= note: `#[deny(clippy::not_unsafe_ptr_arg_deref)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
error: this public function might dereference a raw pointer but is not marked `unsafe`
--> src/cache.rs:40:29
|
40 | name: apt::get_fullname(pkg_ptr, true),
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
error: this public function might dereference a raw pointer but is not marked `unsafe`
--> src/cache.rs:41:41
|
41 | arch: raw::own_string(apt::pkg_arch(pkg_ptr)).unwrap(),
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
error: this public function might dereference a raw pointer but is not marked `unsafe`
--> src/cache.rs:42:41
|
42 | has_versions: apt::pkg_has_versions(pkg_ptr),
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
error: this public function might dereference a raw pointer but is not marked `unsafe`
--> src/cache.rs:43:41
|
43 | has_provides: apt::pkg_has_provides(pkg_ptr),
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:39:13
|
39 | _cache: _cache,
| ^^^^^^
|
= note: `-W clippy::used-underscore-binding` implied by `-W clippy::pedantic`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: this method could have a `#[must_use]` attribute
--> src/cache.rs:48:2
|
48 | pub fn get_fullname(&self, pretty: bool) -> String {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn get_fullname(&self, pretty: bool) -> String`
|
= note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
warning: this method could have a `#[must_use]` attribute
--> src/cache.rs:52:2
|
52 | pub fn candidate(&self) -> Option<Version> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn candidate(&self) -> Option<Version>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:54:41
|
54 | let ver = apt::pkg_candidate_version(self._cache, self.pkg_ptr);
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:58:22
|
58 | Some(Version::new(self._cache, ver))
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: this method could have a `#[must_use]` attribute
--> src/cache.rs:62:2
|
62 | pub fn installed(&self) -> Option<Version> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn installed(&self) -> Option<Version>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:68:22
|
68 | Some(Version::new(self._cache, ver))
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: this method could have a `#[must_use]` attribute
--> src/cache.rs:72:2
|
72 | pub fn is_upgradable(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn is_upgradable(&self) -> bool`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:73:35
|
73 | unsafe { apt::pkg_is_upgradable(self._cache, self.pkg_ptr) }
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
error: this public function might dereference a raw pointer but is not marked `unsafe`
--> src/cache.rs:80:49
|
80 | let version_iterator = apt::pkg_version_list(pkg_ptr);
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: consider adding a `;` to the last statement for consistent formatting
--> src/cache.rs:84:6
|
84 | apt::ver_next(version_iterator)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `apt::ver_next(version_iterator);`
|
= note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:90:35
|
90 | version_map.push(Version::new(self._cache, version_iterator));
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: use of `unwrap_or` followed by a function call
--> src/cache.rs:193:57
|
193 | section: raw::own_string(apt::ver_section(ver_ptr)).unwrap_or(String::from("None")),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| String::from("None"))`
|
= note: `#[warn(clippy::or_fun_call)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
warning: this method could have a `#[must_use]` attribute
--> src/cache.rs:205:2
|
205 | pub fn get_uris(&self) -> Vec<String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn get_uris(&self) -> Vec<String>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
warning: docs for function which may panic missing `# Panics` section
--> src/cache.rs:205:2
|
205 | / pub fn get_uris(&self) -> Vec<String> {
206 | | let mut uris = Vec::new();
207 | | for package_file in &self.file_list {
208 | | unsafe {
... |
219 | | uris
220 | | }
| |_____^
|
note: first possible panic found here
--> src/cache.rs:210:6
|
210 | / raw::own_string(apt::ver_uri(
211 | | self.cache,
212 | | package_file.parser,
213 | | package_file.file,
214 | | ))
215 | | .unwrap(),
| |_____________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
warning: you should consider adding a `Default` implementation for `Records`
--> src/cache.rs:272:2
|
272 | / pub fn new() -> Self {
273 | | Records {
274 | | _helper: RefCell::new("Not been helped!".to_string()),
275 | | }
276 | | }
| |_____^
|
= note: `#[warn(clippy::new_without_default)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
271 + impl Default for Records {
272 + fn default() -> Self {
273 + Self::new()
274 + }
275 + }
|
warning: this method could have a `#[must_use]` attribute
--> src/cache.rs:272:2
|
272 | pub fn new() -> Self {
| ^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new() -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
warning: used binding `_helper` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:280:3
|
280 | self._helper.replace("We've been helped!".to_string());
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: consider adding a `;` to the last statement for consistent formatting
--> src/cache.rs:285:3
|
285 | println!("{}", self._helper.borrow())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `println!("{}", self._helper.borrow());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
warning: used binding `_helper` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:285:18
|
285 | println!("{}", self._helper.borrow())
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:299:27
|
299 | apt::pkg_cache_release(self._cache);
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: you should consider adding a `Default` implementation for `Cache`
--> src/cache.rs:305:2
|
305 | / pub fn new() -> Self {
306 | | unsafe {
307 | | apt::init_config_system();
308 | | let cache_ptr = apt::pkg_cache_create();
... |
314 | | }
315 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
304 + impl Default for Cache {
305 + fn default() -> Self {
306 + Self::new()
307 + }
308 + }
|
warning: this method could have a `#[must_use]` attribute
--> src/cache.rs:305:2
|
305 | pub fn new() -> Self {
| ^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new() -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:319:23
|
319 | apt::depcache_init(self._cache);
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
error: this public function might dereference a raw pointer but is not marked `unsafe`
--> src/cache.rs:324:26
|
324 | unsafe { apt::validate(ver, self._cache) }
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:324:31
|
324 | unsafe { apt::validate(ver, self._cache) }
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: docs for function which may panic missing `# Panics` section
--> src/cache.rs:328:2
|
328 | / pub fn get(&self, name: &str) -> Option<Package> {
329 | | let _name: &str;
330 | | let _arch: &str;
331 | |
... |
352 | | Some(Package::new(self._cache, pkg_ptr))
353 | | }
| |_____^
|
note: first possible panic found here
--> src/cache.rs:336:5
|
336 | panic!("Value is wrong");
| ^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
warning: single-character string constant used as pattern
--> src/cache.rs:332:20
|
332 | if name.contains(":") {
| ^^^ help: try using a `char` instead: `':'`
|
= note: `#[warn(clippy::single_char_pattern)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
warning: single-character string constant used as pattern
--> src/cache.rs:333:40
|
333 | let package: Vec<&str> = name.split(":").collect();
| ^^^ help: try using a `char` instead: `':'`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
warning: only a `panic!` in `if`-then statement
--> src/cache.rs:335:4
|
335 | / if package.len() > 2 {
336 | | panic!("Value is wrong");
337 | | }
| |_____________^ help: try: `assert!(!(package.len() > 2), "Value is wrong");`
|
= note: `-W clippy::manual-assert` implied by `-W clippy::pedantic`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_assert
warning: used binding `_name` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:346:35
|
346 | let pkg_ptr = self.find_by_name(_name, _arch);
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: used binding `_arch` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:346:42
|
346 | let pkg_ptr = self.find_by_name(_name, _arch);
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:352:21
|
352 | Some(Package::new(self._cache, pkg_ptr))
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:363:42
|
363 | return apt::pkg_cache_find_name_arch(self._cache, name.as_ptr(), arch.as_ptr());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:365:29
|
365 | apt::pkg_cache_find_name(self._cache, name.as_ptr())
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: this argument is passed by value, but not consumed in the function body
--> src/cache.rs:369:29
|
369 | pub fn sorted(&self, sort: PackageSort) -> BTreeMap<String, Package> {
| ^^^^^^^^^^^ help: consider taking a reference instead: `&PackageSort`
|
= note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
help: consider marking this type as `Copy`
--> src/cache.rs:247:1
|
247 | / pub struct PackageSort {
248 | | pub upgradable: bool,
249 | | pub virtual_pkgs: bool,
250 | | }
| |_^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:372:38
|
372 | let pkg_iterator = apt::pkg_begin(self._cache);
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:388:51
|
388 | if sort.upgradable && !apt::pkg_is_upgradable(self._cache, pkg_iterator) {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:394:19
|
394 | Package::new(self._cache, pkg_iterator),
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> src/cache.rs:404:5
|
404 | .into_iter()
| ^^^^^^^^^ help: call directly: `iter`
|
= note: `#[warn(clippy::into_iter_on_ref)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
warning: used binding `_cache` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> src/cache.rs:405:32
|
405 | .map(|pkg_ptr| Package::new(self._cache, *pkg_ptr))
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
warning: this function could have a `#[must_use]` attribute
--> src/raw.rs:68:3
|
68 | pub fn pkg_cache_create() -> *mut PCache;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn pkg_cache_create() -> *mut PCache`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:69:3
|
69 | pub unsafe fn depcache_init(pcache: *mut PCache);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(clippy::missing_safety_doc)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:74:3
|
74 | pub unsafe fn pkg_cache_release(cache: *mut PCache);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:76:3
|
76 | / pub unsafe fn pkg_cache_compare_versions(
77 | | cache: *mut PCache,
78 | | left: *const c_char,
79 | | right: *const c_char,
80 | | ) -> i32;
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:85:3
|
85 | pub unsafe fn pkg_begin(cache: *mut PCache) -> *mut PPkgIterator;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:86:3
|
86 | / pub unsafe fn pkg_cache_find_name(
87 | | cache: *mut PCache,
88 | | name: *const c_char,
89 | | ) -> *mut PPkgIterator;
| |_______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:90:3
|
90 | / pub unsafe fn pkg_cache_find_name_arch(
91 | | cache: *mut PCache,
92 | | name: *const c_char,
93 | | arch: *const c_char,
94 | | ) -> *mut PPkgIterator;
| |_______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:95:3
|
95 | pub unsafe fn pkg_release(iterator: *mut PPkgIterator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:98:3
|
98 | pub unsafe fn pkg_next(iterator: *mut PPkgIterator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:99:3
|
99 | pub unsafe fn ver_next(iterator: *mut PVerIterator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:100:3
|
100 | pub unsafe fn pkg_end(iterator: *mut PPkgIterator) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:101:3
|
101 | pub unsafe fn ver_end(iterator: *mut PVerIterator) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:105:3
|
105 | pub unsafe fn pkg_clone(iterator: *mut PPkgIterator) -> *mut PPkgIterator;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:106:3
|
106 | pub unsafe fn pkg_has_versions(iterator: *mut PPkgIterator) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:107:3
|
107 | pub unsafe fn pkg_has_provides(iterator: *mut PPkgIterator) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:108:3
|
108 | pub unsafe fn pkg_is_upgradable(cache: *mut PCache, iterator: *mut PPkgIterator) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:109:3
|
109 | pub unsafe fn pkg_name(iterator: *mut PPkgIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:110:3
|
110 | pub unsafe fn get_fullname(iterator: *mut PPkgIterator, pretty: bool) -> String;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:111:3
|
111 | pub unsafe fn pkg_arch(iterator: *mut PPkgIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:112:3
|
112 | pub unsafe fn pkg_current_version(iterator: *mut PPkgIterator) -> *mut PVerIterator;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:113:3
|
113 | / pub unsafe fn pkg_candidate_version(
114 | | cache: *mut PCache,
115 | | iterator: *mut PPkgIterator,
116 | | ) -> *mut PVerIterator;
| |_______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:117:3
|
117 | pub unsafe fn validate(iterator: *mut PVerIterator, depcache: *mut PCache) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:122:3
|
122 | pub unsafe fn pkg_version_list(pkg: *mut PPkgIterator) -> *mut PVerIterator;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:123:3
|
123 | pub unsafe fn ver_release(iterator: *mut PVerIterator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:128:3
|
128 | pub unsafe fn ver_str(iterator: *mut PVerIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:129:3
|
129 | pub unsafe fn ver_section(iterator: *mut PVerIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:130:3
|
130 | pub unsafe fn ver_source_package(iterator: *mut PVerIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:131:3
|
131 | pub unsafe fn ver_source_version(iterator: *mut PVerIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:132:3
|
132 | pub unsafe fn ver_arch(iterator: *mut PVerIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:133:3
|
133 | pub unsafe fn ver_priority_str(iterator: *mut PVerIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:134:3
|
134 | pub unsafe fn ver_priority(cache: *mut PCache, iterator: *mut PVerIterator) -> i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:135:3
|
135 | / pub unsafe fn ver_uri(
136 | | pcache: *mut PCache,
137 | | parser: *mut PkgRecords,
138 | | pkgfile: *mut PPkgFileIterator,
139 | | ) -> *const c_char;
| |___________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:144:3
|
144 | pub unsafe fn ver_iter_dep_iter(iterator: *mut PVerIterator) -> *mut PDepIterator;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:145:3
|
145 | pub unsafe fn dep_iter_release(iterator: *mut PDepIterator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:147:3
|
147 | pub unsafe fn dep_iter_next(iterator: *mut PDepIterator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:148:3
|
148 | pub unsafe fn dep_iter_end(iterator: *mut PDepIterator) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:158:3
|
158 | pub unsafe fn ver_file(iterator: *mut PVerIterator) -> *mut PVerFileIterator;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:159:3
|
159 | pub unsafe fn ver_file_release(iterator: *mut PVerFileIterator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:161:3
|
161 | pub unsafe fn ver_file_next(iterator: *mut PVerFileIterator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:162:3
|
162 | pub unsafe fn ver_file_end(iterator: *mut PVerFileIterator) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:164:3
|
164 | / pub unsafe fn ver_file_lookup(
165 | | cache: *mut PCache,
166 | | iterator: *mut PVerFileIterator,
167 | | ) -> *mut PkgRecords;
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:170:3
|
170 | pub unsafe fn long_desc(cache: *mut PCache, iterator: *mut PPkgIterator) -> String;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:174:3
|
174 | pub unsafe fn ver_pkg_file(iterator: *mut PVerFileIterator) -> *mut PPkgFileIterator;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:175:3
|
175 | pub unsafe fn pkg_file_iter_release(iterator: *mut PPkgFileIterator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:177:3
|
177 | pub unsafe fn pkg_file_iter_next(iterator: *mut PPkgFileIterator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:178:3
|
178 | pub unsafe fn pkg_file_iter_end(iterator: *mut PPkgFileIterator) -> bool;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:180:3
|
180 | pub unsafe fn pkg_file_iter_file_name(iterator: *mut PPkgFileIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:181:3
|
181 | pub unsafe fn pkg_file_iter_archive(iterator: *mut PPkgFileIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:182:3
|
182 | pub unsafe fn pkg_file_iter_version(iterator: *mut PPkgFileIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:183:3
|
183 | pub unsafe fn pkg_file_iter_origin(iterator: *mut PPkgFileIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:184:3
|
184 | pub unsafe fn pkg_file_iter_codename(iterator: *mut PPkgFileIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:185:3
|
185 | pub unsafe fn pkg_file_iter_label(iterator: *mut PPkgFileIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:186:3
|
186 | pub unsafe fn pkg_file_iter_site(iterator: *mut PPkgFileIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:187:3
|
187 | pub unsafe fn pkg_file_iter_component(iterator: *mut PPkgFileIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:188:3
|
188 | pub unsafe fn pkg_file_iter_architecture(iterator: *mut PPkgFileIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:189:3
|
189 | pub unsafe fn pkg_file_iter_index_type(iterator: *mut PPkgFileIterator) -> *const c_char;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: this function could have a `#[must_use]` attribute
--> src/raw.rs:193:1
|
193 | pub unsafe fn own_string(ptr: *const c_char) -> Option<String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub unsafe fn own_string(ptr: *const c_char) -> Option<String>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
warning: unsafe function's docs miss `# Safety` section
--> src/raw.rs:193:1
|
193 | / pub unsafe fn own_string(ptr: *const c_char) -> Option<String> {
194 | | if ptr.is_null() {
195 | | None
196 | | } else {
... |
203 | | }
204 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
warning: `rust-apt` (lib) generated 104 warnings
error: could not compile `rust-apt` due to 7 previous errors; 104 warnings emitted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment