Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump smartstring from 0.2.9 to 1.0.1 #63

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 25, 2022

Bumps smartstring from 0.2.9 to 1.0.1.

Release notes

Sourced from smartstring's releases.

v1.0.1

FIXED

  • To avoid an issue where allocated heap memory may be deallocated with a different layout alignment than it was officially allocated with when converting between std::string::String and SmartString, even if otherwise correctly aligned, the respective From implementations now use std::alloc::Allocator::grow() to re-align the heap data as necessary. An unfortunate consequence of this is that because the std::alloc::Allocator API hasn't been stabilised yet, unless you're on nightly or some future stable rustc version after allocator_api has been stabilised, converting between String and SmartString will always reallocate and copy (making it always O(n) rather than O(1) when correctly aligned and O(n) otherwise). (#28)

1.0.0

CHANGED

  • smartstring now implements its own boxed string type rather than deferring directly to String, so it no longer makes assumptions it shouldn't be making about the layout of the String struct.

    This also allows us to organise the boxed struct in a way that will let us rely only on our basic assumption that heap memory is word aligned on both big and little endian architectures. The most immediate consequence of this is that smartstring will now compile on 32-bit big endian architectures such as mips.

    We are now also explicitly allocating heap memory aligned for u16 rather than u8, ensuring the assumption about pointer alignment becomes an invariant.

    In short: smartstring no longer relies on undefined behaviour, and should be safe to use anywhere.

  • The above means that the boxed SmartString is no longer pointer compatible with String, so if you were relying on that despite the documentation urging you not to, you'll really have to stop it now. Converting between SmartString and String using From and Into traits is still efficient and allocation free.

  • The minimum supported rustc version is now 1.57.0.

  • The smartstring::validate() function has been removed, as it's no longer needed.

0.2.10

CHANGED

  • The minimum supported rustc version has been increased to 1.56.0, and the rust-version field has been added to the crate's Cargo.toml to indicate the MSRV. (The rust-version field itself was introduced in version 1.56, hence the bump.)
  • Dependencies have been bumped, most notably to arbitrary version 1.
Changelog

Sourced from smartstring's changelog.

[1.0.1] - 2022-03-24

FIXED

  • To avoid an issue where allocated heap memory may be deallocated with a different layout alignment than it was officially allocated with when converting between std::string::String and SmartString, even if otherwise correctly aligned, the respective From implementations now use std::alloc::Allocator::grow() to re-align the heap data as necessary. An unfortunate consequence of this is that because the std::alloc::Allocator API hasn't been stabilised yet, unless you're on nightly or some future stable rustc version after allocator_api has been stabilised, converting between String and SmartString will always reallocate and copy (making it always O(n) rather than O(1) when correctly aligned and O(n) otherwise). (#28)

[1.0.0] - 2022-02-24

CHANGED

  • smartstring now implements its own boxed string type rather than deferring directly to String, so it no longer makes assumptions it shouldn't be making about the layout of the String struct.

    This also allows us to organise the boxed struct in a way that will let us rely only on our basic assumption that heap memory is word aligned on both big and little endian architectures. The most immediate consequence of this is that smartstring will now compile on 32-bit big endian architectures such as mips.

    We are now also explicitly allocating heap memory aligned for u16 rather than u8, ensuring the assumption about pointer alignment becomes an invariant.

    In short: smartstring no longer relies on undefined behaviour, and should be safe to use anywhere.

  • The above means that the boxed SmartString is no longer pointer compatible with String, so if you were relying on that despite the documentation urging you not to, you'll really have to stop it now. Converting between SmartString and String using From and Into traits is still efficient and allocation free.

  • The minimum supported rustc version is now 1.57.0.

  • The smartstring::validate() function has been removed, as it's no longer needed.

[0.2.10] - 2022-02-20

CHANGED

  • The minimum supported rustc version has been increased to 1.56.0, and the rust-version field has been added to the crate's Cargo.toml to indicate the MSRV. (The rust-version field itself was introduced in version 1.56, hence the bump.)
  • Dependencies have been bumped, most notably to arbitrary version 1.
Commits
  • e407ca2 (cargo-release) version 1.0.1
  • 73a4081 Clippy appeasement.
  • 8c51e57 Use the allocator to properly realign heap buffers when converting between St...
  • e3b6d55 (cargo-release) version 1.0.0
  • 65c1d42 Ensure that String pointers are aligned before converting into BoxedString.
  • 7e3a4fc Polish off the docs a bit pre-release.
  • 6e040d0 Fix typos in endian detection.
  • ef3f6f7 Be smarter and less UB about pointer alignment.
  • ec8a93d Don't use a 64 bit integer literal, or tests will break on 32 bit arches.
  • dd4495f Merge pull request #27 from bodil/safe-layout
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [smartstring](https://github.com/bodil/smartstring) from 0.2.9 to 1.0.1.
- [Release notes](https://github.com/bodil/smartstring/releases)
- [Changelog](https://github.com/bodil/smartstring/blob/master/CHANGELOG.md)
- [Commits](bodil/smartstring@v0.2.9...v1.0.1)

---
updated-dependencies:
- dependency-name: smartstring
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from Tamschi as a code owner March 25, 2022 07:15
@dependabot dependabot bot added domain: Rust Involves Rust code. type: upkeep Converting measurements, reorganizing folder structure, and other necessary tasks. labels Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: Rust Involves Rust code. type: upkeep Converting measurements, reorganizing folder structure, and other necessary tasks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant