Skip to content

Commit

Permalink
Update dependencies and bump the patch version
Browse files Browse the repository at this point in the history
  • Loading branch information
tux3 committed Nov 18, 2021
1 parent f2d3c36 commit f06e3c6
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 72 deletions.
127 changes: 66 additions & 61 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "armerge"
version = "1.3.1"
version = "1.3.2"
authors = ["tux3 <barrdetwix@gmail.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand All @@ -12,11 +12,11 @@ description = "Tool to merge and control visibility of static libraries"
[dependencies]
objpoke = "0.2"
structopt = "0.3"
ar = "0.8"
ar = "0.9"
tempdir = "0.3.7"
rand = "0.7.3"
object = "0.23"
goblin = "0.3"
rand = "0.8"
object = "0.27"
goblin = "0.4"
regex = "1.3.9"
rayon = "1.4.0"
which = "4.0.2"
Expand Down
8 changes: 4 additions & 4 deletions src/archives.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::arbuilder::ArBuilder;
use crate::objects::ObjectTempDir;
use ar::Archive;
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
use rand::distributions::{Alphanumeric, DistString};
use rand::thread_rng;
use std::error::Error;
use std::fs::File;
use std::io::Write;
Expand All @@ -24,12 +24,12 @@ pub fn extract_objects(archives: &[PathBuf]) -> Result<ObjectTempDir, Box<dyn Er
while let Some(entry_result) = archive.next_entry() {
let mut entry = entry_result?;

let rnd: String = thread_rng().sample_iter(&Alphanumeric).take(8).collect();
let rnd: String = Alphanumeric.sample_string(&mut thread_rng(), 8);
let mut obj_path = dir.path().to_owned();
obj_path.push(format!(
"{}@{}.{}.o",
archive_name,
from_utf8(entry.header().identifier())?.to_string(),
from_utf8(entry.header().identifier())?,
&rnd
));

Expand Down
2 changes: 1 addition & 1 deletion src/objects/syms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl ObjectSyms {
let mut has_exported_symbols = false;

let data = std::fs::read(object_path)?;
let file = object::File::parse(&data)?;
let file = object::File::parse(data.as_slice())?;
for sym in file.symbols() {
if sym.kind() != SymbolKind::Text
&& sym.kind() != SymbolKind::Data
Expand Down
2 changes: 1 addition & 1 deletion src/objects/system_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub fn create_symbol_filter_list(

for object_path in objects.into_iter() {
let data = std::fs::read(object_path)?;
let file = object::File::parse(&data)?;
let file = object::File::parse(data.as_slice())?;
'next_symbol: for sym in file.symbols() {
if !sym.is_global()
|| sym.is_undefined()
Expand Down

0 comments on commit f06e3c6

Please sign in to comment.