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

Remove unmaintained third-party safemem crate #22504

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions third_party/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions third_party/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1029,10 +1029,6 @@ package = "rustversion"
path = "../../../third_party/rust/ryu/v1/crate"
package = "ryu"

[patch.crates-io.safemem_v0_3]
path = "safemem/v0_3/crate"
package = "safemem"

[patch.crates-io.scopeguard_v1]
path = "scopeguard/v1/crate"
package = "scopeguard"
Expand Down
1 change: 0 additions & 1 deletion third_party/rust/lol_html/v0_3/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ cargo_crate("lib") {
"//brave/third_party/rust/encoding_rs/v0_8:lib",
"//brave/third_party/rust/hashbrown/v0_12:lib",
"//brave/third_party/rust/lazycell/v1:lib",
"//brave/third_party/rust/safemem/v0_3:lib",
"//brave/third_party/rust/selectors/v0_22:lib",
"//brave/third_party/rust/thiserror/v1:lib",
"//third_party/rust/bitflags/v1:lib",
Expand Down
3 changes: 0 additions & 3 deletions third_party/rust/lol_html/v0_3/crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ version = "1.3.0"
[dependencies.memchr]
version = "2.1.2"

[dependencies.safemem]
version = "0.3.3"

[dependencies.selectors]
version = "0.22.0"

Expand Down
7 changes: 2 additions & 5 deletions third_party/rust/lol_html/v0_3/crate/src/memory/arena.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use super::{MemoryLimitExceededError, SharedMemoryLimiter};
use safemem::copy_over;

/// Preallocated region of memory that can grow and never deallocates during the lifetime of
/// the limiter.
Expand Down Expand Up @@ -48,10 +47,8 @@ impl Arena {
}

pub fn shift(&mut self, byte_count: usize) {
let remainder_len = self.data.len() - byte_count;

copy_over(&mut self.data, byte_count, 0, remainder_len);
self.data.truncate(remainder_len);
self.data.copy_within(byte_count.., 0);
self.data.truncate(self.data.len() - byte_count);
}

pub fn bytes(&self) -> &[u8] {
Expand Down
32 changes: 0 additions & 32 deletions third_party/rust/safemem/v0_3/BUILD.gn

This file was deleted.

7 changes: 0 additions & 7 deletions third_party/rust/safemem/v0_3/README.chromium

This file was deleted.

5 changes: 0 additions & 5 deletions third_party/rust/safemem/v0_3/crate/.cargo_vcs_info.json

This file was deleted.

4 changes: 0 additions & 4 deletions third_party/rust/safemem/v0_3/crate/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions third_party/rust/safemem/v0_3/crate/.travis.yml

This file was deleted.

28 changes: 0 additions & 28 deletions third_party/rust/safemem/v0_3/crate/Cargo.toml

This file was deleted.

18 changes: 0 additions & 18 deletions third_party/rust/safemem/v0_3/crate/Cargo.toml.orig

This file was deleted.

201 changes: 0 additions & 201 deletions third_party/rust/safemem/v0_3/crate/LICENSE-APACHE

This file was deleted.

Loading
Loading