@@ -1143,7 +1143,7 @@ pub fn cfmakesane(termios: &mut Termios) {
1143
1143
/// `tcgetattr()` returns a `Termios` structure with the current configuration for a port. Modifying
1144
1144
/// this structure *will not* reconfigure the port, instead the modifications should be done to
1145
1145
/// the `Termios` structure and then the port should be reconfigured using `tcsetattr()`.
1146
- pub fn tcgetattr < Fd : AsFd > ( fd : & Fd ) -> Result < Termios > {
1146
+ pub fn tcgetattr < Fd : AsFd > ( fd : Fd ) -> Result < Termios > {
1147
1147
let mut termios = mem:: MaybeUninit :: uninit ( ) ;
1148
1148
1149
1149
let res = unsafe {
@@ -1162,7 +1162,7 @@ pub fn tcgetattr<Fd: AsFd>(fd: &Fd) -> Result<Termios> {
1162
1162
/// takes affect at a time specified by `actions`. Note that this function may return success if
1163
1163
/// *any* of the parameters were successfully set, not only if all were set successfully.
1164
1164
pub fn tcsetattr < Fd : AsFd > (
1165
- fd : & Fd ,
1165
+ fd : Fd ,
1166
1166
actions : SetArg ,
1167
1167
termios : & Termios ,
1168
1168
) -> Result < ( ) > {
@@ -1179,7 +1179,7 @@ pub fn tcsetattr<Fd: AsFd>(
1179
1179
1180
1180
/// Block until all output data is written (see
1181
1181
/// [tcdrain(3p)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/tcdrain.html)).
1182
- pub fn tcdrain < Fd : AsFd > ( fd : & Fd ) -> Result < ( ) > {
1182
+ pub fn tcdrain < Fd : AsFd > ( fd : Fd ) -> Result < ( ) > {
1183
1183
Errno :: result ( unsafe { libc:: tcdrain ( fd. as_fd ( ) . as_raw_fd ( ) ) } ) . map ( drop)
1184
1184
}
1185
1185
@@ -1188,7 +1188,7 @@ pub fn tcdrain<Fd: AsFd>(fd: &Fd) -> Result<()> {
1188
1188
///
1189
1189
/// `tcflow()` suspends of resumes the transmission or reception of data for the given port
1190
1190
/// depending on the value of `action`.
1191
- pub fn tcflow < Fd : AsFd > ( fd : & Fd , action : FlowArg ) -> Result < ( ) > {
1191
+ pub fn tcflow < Fd : AsFd > ( fd : Fd , action : FlowArg ) -> Result < ( ) > {
1192
1192
Errno :: result ( unsafe {
1193
1193
libc:: tcflow ( fd. as_fd ( ) . as_raw_fd ( ) , action as c_int )
1194
1194
} )
@@ -1200,7 +1200,7 @@ pub fn tcflow<Fd: AsFd>(fd: &Fd, action: FlowArg) -> Result<()> {
1200
1200
///
1201
1201
/// `tcflush()` will discard data for a terminal port in the input queue, output queue, or both
1202
1202
/// depending on the value of `action`.
1203
- pub fn tcflush < Fd : AsFd > ( fd : & Fd , action : FlushArg ) -> Result < ( ) > {
1203
+ pub fn tcflush < Fd : AsFd > ( fd : Fd , action : FlushArg ) -> Result < ( ) > {
1204
1204
Errno :: result ( unsafe {
1205
1205
libc:: tcflush ( fd. as_fd ( ) . as_raw_fd ( ) , action as c_int )
1206
1206
} )
@@ -1212,7 +1212,7 @@ pub fn tcflush<Fd: AsFd>(fd: &Fd, action: FlushArg) -> Result<()> {
1212
1212
///
1213
1213
/// When using asynchronous data transmission `tcsendbreak()` will transmit a continuous stream
1214
1214
/// of zero-valued bits for an implementation-defined duration.
1215
- pub fn tcsendbreak < Fd : AsFd > ( fd : & Fd , duration : c_int ) -> Result < ( ) > {
1215
+ pub fn tcsendbreak < Fd : AsFd > ( fd : Fd , duration : c_int ) -> Result < ( ) > {
1216
1216
Errno :: result ( unsafe {
1217
1217
libc:: tcsendbreak ( fd. as_fd ( ) . as_raw_fd ( ) , duration)
1218
1218
} )
@@ -1223,7 +1223,7 @@ feature! {
1223
1223
#![ feature = "process" ]
1224
1224
/// Get the session controlled by the given terminal (see
1225
1225
/// [tcgetsid(3)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/tcgetsid.html)).
1226
- pub fn tcgetsid<Fd : AsFd >( fd: & Fd ) -> Result <Pid > {
1226
+ pub fn tcgetsid<Fd : AsFd >( fd: Fd ) -> Result <Pid > {
1227
1227
let res = unsafe { libc:: tcgetsid( fd. as_fd( ) . as_raw_fd( ) ) } ;
1228
1228
1229
1229
Errno :: result( res) . map( Pid :: from_raw)
0 commit comments