From 2d796eba380e8f4e5d935b6b356c9d401917b92d Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sat, 12 Jun 2021 13:12:10 -0600 Subject: Collapse Error into Errno Now that Nix's weird error types are eliminated, there's no reason not to simply use Errno as the Error type. --- test/sys/test_termios.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/sys/test_termios.rs') diff --git a/test/sys/test_termios.rs b/test/sys/test_termios.rs index ce436a13..63d6a51f 100644 --- a/test/sys/test_termios.rs +++ b/test/sys/test_termios.rs @@ -1,7 +1,7 @@ use std::os::unix::prelude::*; use tempfile::tempfile; -use nix::{Error, fcntl}; +use nix::fcntl; use nix::errno::Errno; use nix::pty::openpty; use nix::sys::termios::{self, LocalFlags, OutputFlags, tcgetattr}; @@ -32,14 +32,14 @@ fn test_tcgetattr_pty() { fn test_tcgetattr_enotty() { let file = tempfile().unwrap(); assert_eq!(termios::tcgetattr(file.as_raw_fd()).err(), - Some(Error(Errno::ENOTTY))); + Some(Errno::ENOTTY)); } // Test tcgetattr on an invalid file descriptor #[test] fn test_tcgetattr_ebadf() { assert_eq!(termios::tcgetattr(-1).err(), - Some(Error(Errno::EBADF))); + Some(Errno::EBADF)); } // Test modifying output flags @@ -126,5 +126,5 @@ fn test_local_flags() { let read = read(pty.master, &mut buf).unwrap_err(); close(pty.master).unwrap(); close(pty.slave).unwrap(); - assert_eq!(read, Error(Errno::EAGAIN)); + assert_eq!(read, Errno::EAGAIN); } -- cgit v1.2.3