Update Rust crate bincode to v2.0.0 (#115)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [bincode](https://github.com/bincode-org/bincode) | dependencies | patch | `2.0.0-rc.3` -> `2.0.0` | --- ### Release Notes <details> <summary>bincode-org/bincode (bincode)</summary> ### [`v2.0.0`](https://github.com/bincode-org/bincode/releases/tag/v2.0.0) [Compare Source](https://github.com/bincode-org/bincode/compare/v2.0.0-rc.3...v2.0.0) Stable! Finally! After 4 years in development! Many changes have made it in since rc.3, including (unfortunately) some last minute breaking changes. But documentation has been cleaned up to a point where we finally feel comfortable committing to things as they are. If you haven't been following along with the 2.0 changes here is a brief overview - Completely rewritten API decoupled from serde - `no_std` support - Official format specification - Default configuration changes - Increase MSRV to 1.85.0 #### What's Changed since 1.3.1 - Fix `WithOtherTrailing` and `WithOtherIntEncoding` by [@​luben](https://github.com/luben) in https://github.com/bincode-org/bincode/pull/342 - Update docs to highlight differences between DefaultOptions and fns by [@​apgoetz](https://github.com/apgoetz) in https://github.com/bincode-org/bincode/pull/373 - Address questions regarding suitability for storage and untrusted inputs by [@​mbr](https://github.com/mbr) in https://github.com/bincode-org/bincode/pull/346 - Fixed a stray comment. by [@​manuthambi](https://github.com/manuthambi) in https://github.com/bincode-org/bincode/pull/360 - update CI to new branching scheme by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/376 - clarify msrv support by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/375 - fix linting ci error by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/377 - prep branch for 2.0 work by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/379 - Update URLs and some cleanups by [@​atouchet](https://github.com/atouchet) in https://github.com/bincode-org/bincode/pull/383 - fix typo by [@​ehooi](https://github.com/ehooi) in https://github.com/bincode-org/bincode/pull/392 - Edit version badge link by [@​atouchet](https://github.com/atouchet) in https://github.com/bincode-org/bincode/pull/389 - Optimize varint parsing by [@​saethlin](https://github.com/saethlin) in https://github.com/bincode-org/bincode/pull/337 - Fix CI on trunk by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/408 - Update logo by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/407 - Make bincode_derive 0 dependencies by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/409 - Config rewrite by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/412 - Reintroduce varint optimizations by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/414 - Feature/deserde by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/413 - Updated readme.md and added a test for the examples by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/417 - Update authors to reflect current code state by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/418 - Add necessary metadata to bincode_derive by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/420 - Replace test-all-features with a manual CI matrix by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/419 - Made the zigzag encoding examples compile and run by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/421 - Fix some typos by [@​Seppel3210](https://github.com/Seppel3210) in https://github.com/bincode-org/bincode/pull/423 - Generate qualified Result type in derive by [@​andrenth](https://github.com/andrenth) in https://github.com/bincode-org/bincode/pull/430 - Fixes for 427 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/428 - split off BorrowDecode from Decode in bincode_derive by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/432 - functions to enable encoding/decoding serde types by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/422 - Allow serde types to be Decode/Encoded by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/434 - Release 2.0.0-alpha.1 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/435 - Added Decode/Encode for HashMap\<K, V> by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/438 - Added test case for a borrowed str by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/441 - Fixed clippy warnings by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/447 - Impl BorrowDecode for Option<&\[u8]> and Option<\&str> by [@​songzhi](https://github.com/songzhi) in https://github.com/bincode-org/bincode/pull/446 - Feature/config limit by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/439 - \[Breaking change] Made all `decode_from_slice` also return the number of bytes read by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/445 - Extract virtue by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/443 - Made the CI also check the benchmarks, fixed compile issue in benchmarks by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/449 - Made the derive macros automatically implement the required traits on generic arguments by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/454 - Release v2.0.0-alpha.2 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/455 - feat: Make `Configuration` functions `const` by [@​Popog](https://github.com/Popog) in https://github.com/bincode-org/bincode/pull/456 - Fix failed varint bench by [@​ygf11](https://github.com/ygf11) in https://github.com/bincode-org/bincode/pull/457 - Updated readme, added a paragraph on why we don't support #\[repr(u8)] by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/461 - Bump virtue 0.0.4 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/463 - Fixed derive impl on an empty enum by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/462 - Release v2.0.0-beta.0 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/464 - Fix overflow error when deserializing invalid Duration by [@​5225225](https://github.com/5225225) in https://github.com/bincode-org/bincode/pull/465 - Fix panic with invalid system time by [@​5225225](https://github.com/5225225) in https://github.com/bincode-org/bincode/pull/469 - Add fuzzing harness, try to decode into various types by [@​5225225](https://github.com/5225225) in https://github.com/bincode-org/bincode/pull/468 - Switched Decode and BorrowDecode to take \&mut D by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/470 - Switch Encode to take \&mut E by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/471 - Implemented the newly stabilized CString::from_vec_with_nul method by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/473 - Made SerdeDecoder attempt to allocate memory before complaining by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/475 - Update documentation by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/480 - Moved Configuration::standard() and ::legacy() to the config module by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/481 - Feature/improve serde by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/477 - made the serde functions consistent with the base bincode functions by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/483 - Migration guide by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/482 - Release v2.0.0-beta.1 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/484 - Run code coverage on all features by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/485 - Added #\[serde(untagged)] to the documentation of attributes that don't work by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/486 - Fixed an error in bincode derive where it would implement the wrong trait if a generic parameter is present by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/487 - Release v2.0.0-beta.2 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/488 - Added a table to the documentation to pick which functions to use by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/490 - Fix a bunch of typos by [@​poljar](https://github.com/poljar) in https://github.com/bincode-org/bincode/pull/492 - Return an error if a decoded slice length doesn't fit into usize by [@​poljar](https://github.com/poljar) in https://github.com/bincode-org/bincode/pull/491 - Updated to virtue 0.0.6, added #\[bincode(crate = other)] attribute by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/494 - Bumped dependency of virtue to 0.0.7 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/495 - Bincode 1 compatibility framework by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/489 - Added documentation on how to add compatibility tests by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/497 - Made the compatibility check also include bincode 2 serde, and added comments by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/501 - Fix CString compatibility with bincode v1 by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/502 - Fuzz for compatibility with bincode v1 by [@​5225225](https://github.com/5225225) in https://github.com/bincode-org/bincode/pull/498 - Fix/issue 500 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/503 - Add Membership test by [@​ppamorim](https://github.com/ppamorim) in https://github.com/bincode-org/bincode/pull/500 - Release v2.0.0-beta.3 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/505 - Reference implementations for Reader and Writer by [@​BRA1L0R](https://github.com/BRA1L0R) in https://github.com/bincode-org/bincode/pull/507 - Made config::standard() implement .write_fixed_array_header() by default by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/509 - Added HashSet by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/516 - Made the compat fuzzer ignore any LimitExceeded error by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/515 - Release 2.0.0-rc.1 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/510 - Add zoxide under Bincode in the Wild by [@​ajeetdsouza](https://github.com/ajeetdsouza) in https://github.com/bincode-org/bincode/pull/525 - Made the Cow Encode constraints more permissive by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/524 - Added `additional` to the `UnexpectedEnd` decode error by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/522 - Allow encoding/decoding of HashMap and HashSet with custom hash algorithms by [@​bronsonp](https://github.com/bronsonp) in https://github.com/bincode-org/bincode/pull/529 - Added `std::error::Error::source` by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/530 - Added cross platform tests workflow by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/534 - Fix riscv32 atomics and fix tests on 32-bit platforms by [@​xobs](https://github.com/xobs) in https://github.com/bincode-org/bincode/pull/533 - Fix cross platform tests by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/540 - Switched to weak dependencies by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/538 - Fix tuple struct encoding in serde by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/549 - Rewrite: seperated Decode and BorrowDecode by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/526 - Add impl Encode for \[T], where T: Encode by [@​cronokirby](https://github.com/cronokirby) in https://github.com/bincode-org/bincode/pull/542 - Add impls for Rc<\[T]> and Arc<\[T]> by [@​maciejhirsz](https://github.com/maciejhirsz) in https://github.com/bincode-org/bincode/pull/552 - Shrink `DecodeError` from 48 to 32 bytes on 64-bit arch by [@​maciejhirsz](https://github.com/maciejhirsz) in https://github.com/bincode-org/bincode/pull/553 - Added windows and macos runner by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/554 - Implement `Decode` for `Box<str>` by [@​SabrinaJewson](https://github.com/SabrinaJewson) in https://github.com/bincode-org/bincode/pull/562 - Fixed clippy warning and updated DecodeError by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/574 - Updated test dependencies: uuid and glam by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/576 - Made `peek_read` take `&mut self` by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/572 - Prefixed the E and D generic argument in bincode-derive by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/573 - Implement Default for Configuration by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/575 - Document what the usizes are for ([#​546](https://github.com/bincode-org/bincode/issues/546)) in https://github.com/bincode-org/bincode/pull/577 - Clarify config::legacy() doc to match config::standard() by [@​trevyn](https://github.com/trevyn) in https://github.com/bincode-org/bincode/pull/580 - Implement Encode for tuples with up-to 16 elements. by [@​gz](https://github.com/gz) in https://github.com/bincode-org/bincode/pull/583 - Document configuration generics by [@​trevyn](https://github.com/trevyn) in https://github.com/bincode-org/bincode/pull/581 - Extended BorrowDecode for HashMap to support custom hashers by [@​Speedy37](https://github.com/Speedy37) in https://github.com/bincode-org/bincode/pull/585 - Allow decoding with custom `DeserializeSeed` by [@​MrGVSV](https://github.com/MrGVSV) in https://github.com/bincode-org/bincode/pull/586 - Added `[serde(tag)]` to the list of tags that are known to give issues by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/584 - Release 2.0.0-rc.2 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/588 - Bump `virtue` to 0.0.9 and add test for [#​537](https://github.com/bincode-org/bincode/issues/537) by [@​trevyn](https://github.com/trevyn) in https://github.com/bincode-org/bincode/pull/591 - Encode variant index instead of variant value by [@​trevyn](https://github.com/trevyn) in https://github.com/bincode-org/bincode/pull/593 - Create CODE_OF_CONDUCT.md by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/597 - Move generated files to `target/generated/bincode` by [@​trevyn](https://github.com/trevyn) in https://github.com/bincode-org/bincode/pull/600 - Add DecodeError::Other by [@​odysa](https://github.com/odysa) in https://github.com/bincode-org/bincode/pull/602 - Fixed new clippy lint in rust 1.65.0 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/603 - Add CIFuzz GitHub Action by [@​DavidKorczynski](https://github.com/DavidKorczynski) in https://github.com/bincode-org/bincode/pull/604 - Fixed new clippy warnings by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/617 - Improved encoding and decoding speed of Vec<u8> by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/619 - Bumped virtue to 0.0.13 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/626 - Disabled i686-linux-andoid and x86\_64-linux-android CI as they fail for external reasons by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/627 - Made arrays never encode their length by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/625 - Release rc.3 by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/628 - Fix typos in Spec.md enum example by [@​bigbass1997](https://github.com/bigbass1997) in https://github.com/bincode-org/bincode/pull/630 - fix(doc): broken intra link by [@​elpiel](https://github.com/elpiel) in https://github.com/bincode-org/bincode/pull/634 - Added dependabot by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/636 - Bump actions/checkout from 1 to 3 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/638 - Bump codecov/codecov-action from 2 to 3 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/639 - Update glam requirement from 0.21 to 0.24 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/640 - Update criterion requirement from 0.3 to 0.4 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/637 - Update criterion requirement from 0.4 to 0.5 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/641 - Update virtue requirement from 0.0.13 to 0.0.14 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/645 - Bump actions/upload-artifact from 1 to 3 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/651 - Allow generics in impl_borrow_decode by [@​dullbananas](https://github.com/dullbananas) in https://github.com/bincode-org/bincode/pull/635 - Bump actions/checkout from 3 to 4 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/660 - Fixed a new clippy warning by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/661 - Reverted 'static constraint on T in Vec<T> and \[T; N] by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/663 - Fix cross compilations by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/664 - Added unty dependency and added type checks by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/667 - Fix inconsistent naming between serde and non-serde functions by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/671 - Update virtue requirement from 0.0.14 to 0.0.15 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/673 - Compat and BorrowCompat Debug and Display implementations by [@​aegroto](https://github.com/aegroto) in https://github.com/bincode-org/bincode/pull/670 - Add missing test for encode_utf8 by [@​CXWorks](https://github.com/CXWorks) in https://github.com/bincode-org/bincode/pull/683 - Add getters for current configuration values by [@​shahn](https://github.com/shahn) in https://github.com/bincode-org/bincode/pull/681 - Use const functions where possible by [@​richardpringle](https://github.com/richardpringle) in https://github.com/bincode-org/bincode/pull/684 - Implement Encode & Decode for Wrapping<T> types by [@​mzachar](https://github.com/mzachar) in https://github.com/bincode-org/bincode/pull/686 - Fixed broken commit to trunk by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/687 - Update glam requirement from 0.24 to 0.25 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/688 - Add LICENSE.md to derive/ by [@​jfsulliv](https://github.com/jfsulliv) in https://github.com/bincode-org/bincode/pull/698 - Update virtue requirement from 0.0.15 to 0.0.16 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/692 - Update spec for `Option<T>` encoding by [@​mkeeter](https://github.com/mkeeter) in https://github.com/bincode-org/bincode/pull/702 - Fixed [#​707](https://github.com/bincode-org/bincode/issues/707) by [@​Vrtgs](https://github.com/Vrtgs) in https://github.com/bincode-org/bincode/pull/708 - Miri check by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/704 - Fixed broken miri CI script by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/712 - Fixed a warning in a derive test that would cause CI to fail by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/716 - Put clarifying language in migration guide regarding the serde:: and non-serde:: paths by [@​mcclure](https://github.com/mcclure) in https://github.com/bincode-org/bincode/pull/715 - Fixed new clippy lints by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/721 - Update virtue requirement from 0.0.16 to 0.0.17 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/719 - Add prerelease warning to readme.md by [@​xaocon](https://github.com/xaocon) in https://github.com/bincode-org/bincode/pull/728 - Update virtue requirement from 0.0.17 to 0.0.18 by [@​dependabot](https://github.com/dependabot) in https://github.com/bincode-org/bincode/pull/731 - Fix typo in spec.md by [@​DragonDev1906](https://github.com/DragonDev1906) in https://github.com/bincode-org/bincode/pull/730 - Implement basic traits for `Compat` and `BorrowCompat` by [@​skibon02](https://github.com/skibon02) in https://github.com/bincode-org/bincode/pull/734 - chore typo fix README.md by [@​Hack666r](https://github.com/Hack666r) in https://github.com/bincode-org/bincode/pull/737 - Fix CI and clippy by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/747 - Document making serde an optional dependency by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/746 - Finally got around to updating the spec based on feedback by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/741 - Expose types implementing `serde::Serializer` and `Deserializer` by [@​fjarri](https://github.com/fjarri) in https://github.com/bincode-org/bincode/pull/729 - make serde decode api consistent by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/748 - Decode context by [@​ZoeyR](https://github.com/ZoeyR) in https://github.com/bincode-org/bincode/pull/749 - 2.0.0 stable by [@​VictorKoenders](https://github.com/VictorKoenders) in https://github.com/bincode-org/bincode/pull/742 #### New Contributors - [@​luben](https://github.com/luben) made their first contribution in https://github.com/bincode-org/bincode/pull/342 - [@​apgoetz](https://github.com/apgoetz) made their first contribution in https://github.com/bincode-org/bincode/pull/373 - [@​mbr](https://github.com/mbr) made their first contribution in https://github.com/bincode-org/bincode/pull/346 - [@​manuthambi](https://github.com/manuthambi) made their first contribution in https://github.com/bincode-org/bincode/pull/360 - [@​ehooi](https://github.com/ehooi) made their first contribution in https://github.com/bincode-org/bincode/pull/392 - [@​saethlin](https://github.com/saethlin) made their first contribution in https://github.com/bincode-org/bincode/pull/337 - [@​VictorKoenders](https://github.com/VictorKoenders) made their first contribution in https://github.com/bincode-org/bincode/pull/409 - [@​Seppel3210](https://github.com/Seppel3210) made their first contribution in https://github.com/bincode-org/bincode/pull/423 - [@​andrenth](https://github.com/andrenth) made their first contribution in https://github.com/bincode-org/bincode/pull/430 - [@​songzhi](https://github.com/songzhi) made their first contribution in https://github.com/bincode-org/bincode/pull/446 - [@​Popog](https://github.com/Popog) made their first contribution in https://github.com/bincode-org/bincode/pull/456 - [@​ygf11](https://github.com/ygf11) made their first contribution in https://github.com/bincode-org/bincode/pull/457 - [@​5225225](https://github.com/5225225) made their first contribution in https://github.com/bincode-org/bincode/pull/465 - [@​poljar](https://github.com/poljar) made their first contribution in https://github.com/bincode-org/bincode/pull/492 - [@​ppamorim](https://github.com/ppamorim) made their first contribution in https://github.com/bincode-org/bincode/pull/500 - [@​BRA1L0R](https://github.com/BRA1L0R) made their first contribution in https://github.com/bincode-org/bincode/pull/507 - [@​ajeetdsouza](https://github.com/ajeetdsouza) made their first contribution in https://github.com/bincode-org/bincode/pull/525 - [@​bronsonp](https://github.com/bronsonp) made their first contribution in https://github.com/bincode-org/bincode/pull/529 - [@​xobs](https://github.com/xobs) made their first contribution in https://github.com/bincode-org/bincode/pull/533 - [@​cronokirby](https://github.com/cronokirby) made their first contribution in https://github.com/bincode-org/bincode/pull/542 - [@​maciejhirsz](https://github.com/maciejhirsz) made their first contribution in https://github.com/bincode-org/bincode/pull/552 - [@​SabrinaJewson](https://github.com/SabrinaJewson) made their first contribution in https://github.com/bincode-org/bincode/pull/562 - [@​trevyn](https://github.com/trevyn) made their first contribution in https://github.com/bincode-org/bincode/pull/580 - [@​gz](https://github.com/gz) made their first contribution in https://github.com/bincode-org/bincode/pull/583 - [@​Speedy37](https://github.com/Speedy37) made their first contribution in https://github.com/bincode-org/bincode/pull/585 - [@​MrGVSV](https://github.com/MrGVSV) made their first contribution in https://github.com/bincode-org/bincode/pull/586 - [@​odysa](https://github.com/odysa) made their first contribution in https://github.com/bincode-org/bincode/pull/602 - [@​DavidKorczynski](https://github.com/DavidKorczynski) made their first contribution in https://github.com/bincode-org/bincode/pull/604 - [@​bigbass1997](https://github.com/bigbass1997) made their first contribution in https://github.com/bincode-org/bincode/pull/630 - [@​elpiel](https://github.com/elpiel) made their first contribution in https://github.com/bincode-org/bincode/pull/634 - [@​dependabot](https://github.com/dependabot) made their first contribution in https://github.com/bincode-org/bincode/pull/638 - [@​dullbananas](https://github.com/dullbananas) made their first contribution in https://github.com/bincode-org/bincode/pull/635 - [@​aegroto](https://github.com/aegroto) made their first contribution in https://github.com/bincode-org/bincode/pull/670 - [@​CXWorks](https://github.com/CXWorks) made their first contribution in https://github.com/bincode-org/bincode/pull/683 - [@​shahn](https://github.com/shahn) made their first contribution in https://github.com/bincode-org/bincode/pull/681 - [@​richardpringle](https://github.com/richardpringle) made their first contribution in https://github.com/bincode-org/bincode/pull/684 - [@​mzachar](https://github.com/mzachar) made their first contribution in https://github.com/bincode-org/bincode/pull/686 - [@​jfsulliv](https://github.com/jfsulliv) made their first contribution in https://github.com/bincode-org/bincode/pull/698 - [@​mkeeter](https://github.com/mkeeter) made their first contribution in https://github.com/bincode-org/bincode/pull/702 - [@​Vrtgs](https://github.com/Vrtgs) made their first contribution in https://github.com/bincode-org/bincode/pull/708 - [@​mcclure](https://github.com/mcclure) made their first contribution in https://github.com/bincode-org/bincode/pull/715 - [@​xaocon](https://github.com/xaocon) made their first contribution in https://github.com/bincode-org/bincode/pull/728 - [@​DragonDev1906](https://github.com/DragonDev1906) made their first contribution in https://github.com/bincode-org/bincode/pull/730 - [@​skibon02](https://github.com/skibon02) made their first contribution in https://github.com/bincode-org/bincode/pull/734 - [@​Hack666r](https://github.com/Hack666r) made their first contribution in https://github.com/bincode-org/bincode/pull/737 - [@​fjarri](https://github.com/fjarri) made their first contribution in https://github.com/bincode-org/bincode/pull/729 **Full Changelog**: https://github.com/bincode-org/bincode/compare/v1.3.1...v2.0.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=--> Reviewed-on: https://gitea.communiquons.org/pierre/light-openid/pulls/115
This commit is contained in:
parent
b4cd0dbd22
commit
666e4df395
19
Cargo.lock
generated
19
Cargo.lock
generated
@ -87,19 +87,20 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bincode"
|
name = "bincode"
|
||||||
version = "2.0.0-rc.3"
|
version = "2.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95"
|
checksum = "3ad1fa75f77bbd06f187540aa1d70ca50b80b27ce85e7f41c0ce7ff42b34ed3b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode_derive",
|
"bincode_derive",
|
||||||
"serde",
|
"serde",
|
||||||
|
"unty",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bincode_derive"
|
name = "bincode_derive"
|
||||||
version = "2.0.0-rc.3"
|
version = "2.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7e30759b3b99a1b802a7a3aa21c85c3ded5c28e1c83170d82d70f08bbf7f3e4c"
|
checksum = "b1cef5dd4a4457dd11529e743d18ba4fabbd5f20b6895f4c865cb257337dcf9f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"virtue",
|
"virtue",
|
||||||
]
|
]
|
||||||
@ -1381,6 +1382,12 @@ version = "0.9.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unty"
|
||||||
|
version = "0.0.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a1a88342087869553c259588a3ec9ca73ce9b2d538b7051ba5789ff236b6c129"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "url"
|
name = "url"
|
||||||
version = "2.5.4"
|
version = "2.5.4"
|
||||||
@ -1424,9 +1431,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "virtue"
|
name = "virtue"
|
||||||
version = "0.0.13"
|
version = "0.0.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314"
|
checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "want"
|
name = "want"
|
||||||
|
@ -26,7 +26,7 @@ impl CryptoWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Encrypt some data, returning the result as a base64-encoded string
|
/// Encrypt some data, returning the result as a base64-encoded string
|
||||||
pub fn encrypt<T: Encode + Decode>(&self, data: &T) -> Result<String, Box<dyn Error>> {
|
pub fn encrypt<T: Encode + Decode<()>>(&self, data: &T) -> Result<String, Box<dyn Error>> {
|
||||||
let aes_key = Aes256Gcm::new(&self.key);
|
let aes_key = Aes256Gcm::new(&self.key);
|
||||||
let nonce_bytes = rand::rng().random::<[u8; NONCE_LEN]>();
|
let nonce_bytes = rand::rng().random::<[u8; NONCE_LEN]>();
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ impl CryptoWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Decrypt some data previously encrypted using the [`CryptoWrapper::encrypt`] method
|
/// Decrypt some data previously encrypted using the [`CryptoWrapper::encrypt`] method
|
||||||
pub fn decrypt<T: Decode>(&self, input: &str) -> Result<T, Box<dyn Error>> {
|
pub fn decrypt<T: Decode<()>>(&self, input: &str) -> Result<T, Box<dyn Error>> {
|
||||||
let bytes = BASE64_STANDARD.decode(input)?;
|
let bytes = BASE64_STANDARD.decode(input)?;
|
||||||
|
|
||||||
if bytes.len() < NONCE_LEN {
|
if bytes.len() < NONCE_LEN {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user