This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fs::File; | |
use std::io; | |
use std::mem; | |
pub fn close(file: &mut File) -> io::Result<()> { | |
imp::close(mem::replace(file, imp::invalid_file())) | |
} | |
#[cfg(unix)] | |
mod imp { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"schiss", | |
"schiß", | |
"schlamm", | |
"schlampe", | |
"schleim", | |
"schließm", | |
"schlitz", | |
"schlong", | |
"schluck", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cp | |
import ( | |
"io" | |
"os" | |
) | |
func cp(dst, src string) error { | |
s, err := os.Open(src) | |
if err != nil { |