Age | Commit message (Collapse) | Author |
|
- Adapt to the new API:
- Gen is now a struct, not a Trait, and replaces StdThreadGen.
- The rand re-export has been removed. As a consequence, we need
our own function to generate an arbitrary value from a range.
|
|
|
|
|
|
|
|
- tokio 1.12 has RUSTSEC-2021-0124.
|
|
- In assuan:
- tokio::io::AsyncRead::poll_read now uses a ReadBuf buffer instead
of a &mu [u8], so use that and write to the Client's buffer only
if a read was successful.
- Poll::Ready does not report n_read any more, so there cannot be a
conflict between the reported and actual number of bytes read,
remove that case.
- Fixes #780.
|
|
- Found with the help of the clippy::op_ref lint.
|
|
- Improves performance a tiny bit.
|
|
- In CamelCase, acronyms count as one word. Apply this rule where
API and lalrpop are not impacted.
- Found by clippy::upper_case_acronyms.
|
|
- Fixed with the help of clippy::needless_borrow.
|
|
- Change Sequoia's license from GPL 2.0 or later to LGPL 2.0 or
later as unanimously decided on October 18, 2021 by:
- Christof Wahl <cw@pep.security> (pEp security CEO)
- Heiko Schaefer <heiko.schaefer@posteo.de> (pEp Foundation
employee, Sequoia developer)
- Justus Winter <justus@sequoia-pgp.org> (pEp Foundation
employee, Sequoia Founder)
- Neal H. Walfield <neal@pep.foundation> (pEp Foundation
employee, Sequoia Founder)
- Patrick Meier <pm@pep.security> (pEp security Chief Product
and Service Officer)
- Rudolf Bohli <rb@pep.security> (pEp security Chairman of the
Board)
- Volker Birk <vb@pep.security> (pEp security Founder, pEp
Foundation Council)
|
|
Instead of giving Ok() the return value of a function that returns no
value, i.e., the unit value (), give it explicitly. This is clearer
and easier to follow for the reader.
Found by clippy lint unit_arg:
https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
|
|
Found by clippy lint let_and_return:
https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
|
|
The methods were shadowing the implementation of the same function via
the Display trait. One implementation is enough.
Found by the clippy trait inherent_to_string_shadow_display:
https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string_shadow_display
|
|
Instead of this:
if foo {
if bar {
...
}
}
do this:
if foo && bar {
...
}
Nesting statements implies a more complicated code structure than it
really is. Thus it's arguably simpler to write a combined condition by
joining the two conditions with a logical and operation.
Found by clippy lint collapsible_if:
https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
|
|
If a closure just passes the argument it gets to a function, the
closure is usually redundant and you can just use the function instead
of the closure. Thus, instead of this:
iter().map(|x| foo(x))
you can write this:
iter().map(foo)
This is shorter and simpler.
Sometimes it doesn't work and the closure is necessary. Such locations
can be marked with `#[allow(clippy::redundant_closure)]`.
Found by clippy lint redundant_closure:
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
|
Instead of this:
something.iter().cloned().collect()
do this:
something.to_vec()
It's shorter, simpler, and more to the point, and thus easier to
understand.
Found by clippy lint iter_cloned_collect:
https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect
|
|
Test code embedded in document comments do not need to have a main
function, the Rust test infrastructure provides one. Keeping the test
code shorter is more idiomatic and shorter, both of which make it
easier to understand.
Found by clippy lint needless_doctest_main:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
|
|
This was found by clippy lint op_ref:
https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
|
|
Instead of "return foo" as the last statement executed in a function,
just use "foo", which is more idiomatic style.
This was found by the clippy lint needless_return:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
|
|
Rust can automatically deduce lifetimes in some cases ("lifetime
elision"). While adding unnecessary lifetime annotations is not
incorrect, it can make it harder to follow the code: why is there a
lifetime annotation here? What is the reason why it's needed? Is
something unusual going on.
This removes a few unnecessary lifetime annotations, as found by the
clippy lint needless_lifetimes:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
|
|
The extra & in a pattern (match arm or if let) is unnecessary and only
makes the code harder to read. In most places it's enough to just
remove the & from the pattern, but in a few places a dereference (*)
needs to be added where the value captured in the pattern is used, as
removing the & changes the type of the captured value to be a
reference.
Overall, the changes are almost mechanical. Although the diff is huge,
it should be easy to read.
The clippy lint match_ref_pats warns about this. See:
https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats
|
|
|
|
- Apply cargo intraconv.
|
|
- Fixes #742.
|
|
|
|
|
|
|
|
|
|
This fixes a build failure under Windows. It seems the two options
will only work at the crate level in the future so the compiler warns
about them now, and will fail build later. In CI, warnings seem to
fail the build already.
https://github.com/rust-lang/rust/issues/82730
https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level
|
|
|
|
|
|
- Support for the GnuPG keybox format, based on keybox files created by
GnuPG 2.2.23 and the way they are handled by the `kbxutil` program from
that version of GnuPG.
- Most structures that are not related to accessing the OpenPGP certs are
not handled, like X.509 records and metadata sections.
- Closes #252
|
|
|
|
See relevant MR on sequoia-octopus-lib:
https://gitlab.com/sequoia-pgp/sequoia-octopus-librnp/-/merge_requests/42
|
|
- This is d4876e3aa5bf1ce7d35431a632ec20ce23f2d1be in the octopus
repository.
|
|
- The libtest benchmark harness that is automatically added by cargo
interferes with criterion. Disable it everywhere where there are no
benchmarks.
- https://github.com/rust-lang/rust/issues/47241
- https://bheisler.github.io/criterion.rs/book/faq.html
|
|
Having the license file in the root directory is not enough, since
cargo actions for workspace members will not consider this file.
This commit adds a symbolic link to the license file in the root
directory of all workspace members, so "cargo publish" will include
the LICENSE.txt file when publishing crates.
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
- https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
|
|
- Constants have by default a `'static` lifetime
- https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
|
|
|
|
- This causes issues when dependencies are merged as rand 0.8 has more
granular feature selection and at least `std` should be used there.
|
|
- This moves all functionality from sequoia_core crate as an inner
`core` module of the ipc crate.
- The `core` module has to be public as other crates depend on
`core::Context` either directly (store, ffi) or indirectly (store
through ffi crate).
- Remove the `core` crate completely.
|
|
- Rewrite any `expect`s and `unwrap`s into the `?` operator.
- This loses the error detail. It could be recovered using `context`
but for simplicity sake of the example the `?` operator suffices.
- Additionally the `crate::` prefix has been removed as it is not
necessary.
|
|
- Previously the armor::Writer was used but this caused the armoring
not to be finalized and the output to appear truncated.
- Migrate to Armorer to fix the resulting output.
|