Skip to content

Commit

Permalink
Work around missing into_kind method
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Dec 1, 2016
1 parent 72bdaee commit b78a1ac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/rustup-dist/tests/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 72,7 @@ fn add_file_that_exists() {

let err = tx.add_file("c", PathBuf::from("foo/bar")).unwrap_err();

match err.into_kind() {
match err.0 {
ErrorKind::ComponentConflict { name, path } => {
assert_eq!(name, "c");
assert_eq!(path, PathBuf::from("foo/bar"));
Expand Down Expand Up @@ -146,7 146,7 @@ fn copy_file_that_exists() {

let err = tx.copy_file("c", PathBuf::from("foo/bar"), &srcpath).unwrap_err();

match err.into_kind() {
match err.0 {
ErrorKind::ComponentConflict { name, path } => {
assert_eq!(name, "c");
assert_eq!(path, PathBuf::from("foo/bar"));
Expand Down Expand Up @@ -232,7 232,7 @@ fn copy_dir_that_exists() {

let err = tx.copy_dir("c", PathBuf::from("a"), srcdir.path()).unwrap_err();

match err.into_kind() {
match err.0 {
ErrorKind::ComponentConflict { name, path } => {
assert_eq!(name, "c");
assert_eq!(path, PathBuf::from("a"));
Expand Down Expand Up @@ -297,7 297,7 @@ fn remove_file_that_not_exists() {

let err = tx.remove_file("c", PathBuf::from("foo")).unwrap_err();

match err.into_kind() {
match err.0 {
ErrorKind::ComponentMissingFile { name, path } => {
assert_eq!(name, "c");
assert_eq!(path, PathBuf::from("foo"));
Expand Down Expand Up @@ -364,7 364,7 @@ fn remove_dir_that_not_exists() {

let err = tx.remove_dir("c", PathBuf::from("foo")).unwrap_err();

match err.into_kind() {
match err.0 {
ErrorKind::ComponentMissingDir { name, path } => {
assert_eq!(name, "c");
assert_eq!(path, PathBuf::from("foo"));
Expand Down Expand Up @@ -430,7 430,7 @@ fn write_file_that_exists() {
utils_raw::write_file(&prefix.path().join("a"), &content).unwrap();
let err = tx.write_file("c", PathBuf::from("a"), content.clone()).unwrap_err();

match err.into_kind() {
match err.0 {
ErrorKind::ComponentConflict { name, path } => {
assert_eq!(name, "c");
assert_eq!(path, PathBuf::from("a"));
Expand Down

0 comments on commit b78a1ac

Please sign in to comment.