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

Use more appropriate types for cross-platform unicode support #19

Merged
merged 7 commits into from
Jan 17, 2020
Merged
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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ lazy_static = "1"
enum_primitive = "0.1"
num = "0.1"
bitflags = "1"
widestring = "0.4"

[dependencies.unrar_sys]
path = "unrar_sys"
Expand Down
Binary file added data/unicode.rar
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/basic_extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ extern crate unrar;
use unrar::Archive;

fn main() {
Archive::new("archive.rar".into()).extract_to("./archive".into()).unwrap().process().unwrap();
Archive::new("archive.rar").unwrap().extract_to("./archive").unwrap().process().unwrap();
println!("Done.");
}
2 changes: 1 addition & 1 deletion examples/basic_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extern crate unrar;
use unrar::Archive;

fn main() {
for entry in Archive::new("archive.rar".into()).list().unwrap() {
for entry in Archive::new("archive.rar").unwrap().list().unwrap() {
println!("{}", entry.unwrap());
}
}
4 changes: 2 additions & 2 deletions examples/lister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {
std::process::exit(0)
});

match Archive::new(file).list_split() {
match Archive::new(&file).unwrap().list_split() {
// Everything okay, just list the archive
Ok(archive) => list_archive(archive),

Expand Down Expand Up @@ -46,7 +46,7 @@ fn main() {
println!("{}", e);
// emit warning that an error occured.
writeln!(&mut stderr,
"Could not find volume: {}",
"Could not find volume: {:?}",
e.next_volume.unwrap())
.unwrap();
// The iterator will stop by itself, no further action needed.
Expand Down
Loading