mirror of
https://codeberg.org/icewind/netnsd.git
synced 2026-06-03 09:04:07 +02:00
formatting
This commit is contained in:
parent
19e26b476b
commit
fd0dda795c
6 changed files with 10 additions and 10 deletions
|
|
@ -186,7 +186,7 @@ fn validate_name(name: &str) -> bool {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_de() {
|
fn test_de() {
|
||||||
use serde_test::{Token, assert_de_tokens, assert_de_tokens_error};
|
use serde_test::{assert_de_tokens, assert_de_tokens_error, Token};
|
||||||
|
|
||||||
assert_de_tokens(&NamespaceName("foo".into()), &[Token::String("foo")]);
|
assert_de_tokens(&NamespaceName("foo".into()), &[Token::String("foo")]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ pub struct InvalidForwardSource {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_de() {
|
fn test_de() {
|
||||||
use serde_test::{Token, assert_de_tokens, assert_de_tokens_error};
|
use serde_test::{assert_de_tokens, assert_de_tokens_error, Token};
|
||||||
|
|
||||||
let addr_str = "127.0.0.1:80";
|
let addr_str = "127.0.0.1:80";
|
||||||
let addr = SocketAddr::from_str("127.0.0.1:80").unwrap();
|
let addr = SocketAddr::from_str("127.0.0.1:80").unwrap();
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ pub struct InvalidForwardTarget {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_de() {
|
fn test_de() {
|
||||||
use serde_test::{Token, assert_de_tokens, assert_de_tokens_error};
|
use serde_test::{assert_de_tokens, assert_de_tokens_error, Token};
|
||||||
|
|
||||||
let addr_str = "127.0.0.1:80";
|
let addr_str = "127.0.0.1:80";
|
||||||
let addr = SocketAddr::from_str("127.0.0.1:80").unwrap();
|
let addr = SocketAddr::from_str("127.0.0.1:80").unwrap();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::namespace::NamespaceEnterError;
|
use crate::namespace::NamespaceEnterError;
|
||||||
use nix::errno::Errno;
|
use nix::errno::Errno;
|
||||||
use nix::sched::{CloneFlags, setns};
|
use nix::sched::{setns, CloneFlags};
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Error as IoError;
|
use std::io::Error as IoError;
|
||||||
use std::os::fd::{AsFd, AsRawFd, BorrowedFd, OwnedFd, RawFd};
|
use std::os::fd::{AsFd, AsRawFd, BorrowedFd, OwnedFd, RawFd};
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,14 @@ mod raw;
|
||||||
mod sysctl;
|
mod sysctl;
|
||||||
|
|
||||||
use crate::config::{DeviceName, NamespaceName};
|
use crate::config::{DeviceName, NamespaceName};
|
||||||
use crate::link::{LinkError, link_up, move_all_links, move_link_into};
|
use crate::link::{link_up, move_all_links, move_link_into, LinkError};
|
||||||
pub use crate::namespace::handle::{NamespaceHandle, NamespaceHandleError};
|
pub use crate::namespace::handle::{NamespaceHandle, NamespaceHandleError};
|
||||||
use crate::namespace::raw::{NamespaceSetupError, create_network_namespace};
|
use crate::namespace::raw::{create_network_namespace, NamespaceSetupError};
|
||||||
use crate::namespace::sysctl::{CtlError, NamespaceCtl};
|
use crate::namespace::sysctl::{CtlError, NamespaceCtl};
|
||||||
use either::Either;
|
use either::Either;
|
||||||
use nix::errno::Errno;
|
use nix::errno::Errno;
|
||||||
use nix::mount::{MntFlags, MsFlags, mount, umount2};
|
use nix::mount::{mount, umount2, MntFlags, MsFlags};
|
||||||
use std::fs::{File, create_dir, read_dir, remove_file};
|
use std::fs::{create_dir, read_dir, remove_file, File};
|
||||||
use std::io::{Error as IoError, ErrorKind};
|
use std::io::{Error as IoError, ErrorKind};
|
||||||
use std::iter::empty;
|
use std::iter::empty;
|
||||||
use std::os::unix::fs::symlink;
|
use std::os::unix::fs::symlink;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use nix::errno::Errno;
|
use nix::errno::Errno;
|
||||||
use nix::sched::{CloneFlags, clone};
|
use nix::sched::{clone, CloneFlags};
|
||||||
use nix::sys::signal::Signal;
|
use nix::sys::signal::Signal;
|
||||||
use nix::sys::wait::{WaitStatus, waitpid};
|
use nix::sys::wait::{waitpid, WaitStatus};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue