Skip to content

Commit

Permalink
style: bypass lint for OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
ttys3 committed Jan 20, 2023
1 parent 273d5bb commit d3d6556
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions osx-clippy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -eou pipefail

PATH="/usr/local/darwin-ndk-x86_64/bin/:$PATH" \
CC=o64-clang \
CXX=o64-clang++ \
cargo clippy --target x86_64-apple-darwin

1 change: 1 addition & 0 deletions src/os/lsof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::OpenSockets;

use super::lsof_utils;

#[allow(dead_code)]
#[derive(Debug)]
struct RawConnection {
ip: String,
Expand Down
6 changes: 4 additions & 2 deletions src/os/lsof_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ use std::process::Command;

#[derive(Debug, Clone)]
pub struct RawConnection {
#[allow(dead_code)]
remote_ip: String,
local_ip: String,
local_port: String,
#[allow(dead_code)]
remote_port: String,
protocol: String,
pub process_name: String,
Expand Down Expand Up @@ -116,7 +118,7 @@ impl RawConnection {
}

pub fn get_connections() -> RawConnections {
let content = run(&["-n", "-P", "-i4", "-i6", "+c", "0"]);
let content = run(["-n", "-P", "-i4", "-i6", "+c", "0"]);
RawConnections::new(content)
}

Expand All @@ -141,7 +143,7 @@ impl RawConnections {
pub fn new(content: String) -> RawConnections {
let lines: Vec<RawConnection> = content
.lines()
.flat_map(|string| RawConnection::new(string))
.flat_map(RawConnection::new)
.collect();

RawConnections { content: lines }
Expand Down

0 comments on commit d3d6556

Please sign in to comment.