mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-15 01:17:45 +00:00
builtins: make io_streams_t methods publicly accessible
This commit is contained in:
parent
71c2f08e5d
commit
698db6c2a7
1 changed files with 3 additions and 3 deletions
|
@ -66,18 +66,18 @@ pub struct io_streams_t {
|
|||
}
|
||||
|
||||
impl io_streams_t {
|
||||
fn new(mut streams: Pin<&mut builtins_ffi::io_streams_t>) -> io_streams_t {
|
||||
pub fn new(mut streams: Pin<&mut builtins_ffi::io_streams_t>) -> io_streams_t {
|
||||
let out = output_stream_t(streams.as_mut().get_out().unpin());
|
||||
let err = output_stream_t(streams.as_mut().get_err().unpin());
|
||||
let streams = streams.unpin();
|
||||
io_streams_t { streams, out, err }
|
||||
}
|
||||
|
||||
fn ffi_pin(&mut self) -> Pin<&mut builtins_ffi::io_streams_t> {
|
||||
pub fn ffi_pin(&mut self) -> Pin<&mut builtins_ffi::io_streams_t> {
|
||||
unsafe { Pin::new_unchecked(&mut *self.streams) }
|
||||
}
|
||||
|
||||
fn ffi_ref(&self) -> &builtins_ffi::io_streams_t {
|
||||
pub fn ffi_ref(&self) -> &builtins_ffi::io_streams_t {
|
||||
unsafe { &*self.streams }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue