File tree Expand file tree Collapse file tree 10 files changed +14
-16
lines changed
mitmproxy-contentviews/src Expand file tree Collapse file tree 10 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ concurrency:
1111 cancel-in-progress : true
1212
1313env :
14- MSRV : " 1.86 " # Minimum Supported Rust Version
14+ MSRV : " 1.87 " # Minimum Supported Rust Version
1515
1616jobs :
1717 protobuf :
Original file line number Diff line number Diff line change @@ -22,13 +22,13 @@ jobs:
2222 matrix :
2323 include :
2424 - os : windows-latest
25- rust : " 1.86 " # MSRV - can't use variables here.
25+ rust : " 1.87 " # MSRV - can't use variables here.
2626 args : --exclude mitmproxy-linux-ebpf
2727 - os : macos-latest
28- rust : " 1.86 " # MSRV - can't use variables here.
28+ rust : " 1.87 " # MSRV - can't use variables here.
2929 args : --exclude mitmproxy-linux-ebpf
3030 - os : ubuntu-22.04
31- rust : " 1.86 " # MSRV - can't use variables here.
31+ rust : " 1.87 " # MSRV - can't use variables here.
3232 args : --exclude mitmproxy-linux-ebpf
3333 - os : ubuntu-latest
3434 rust : stable
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ version = "0.13.0-dev"
3232publish = false
3333repository = " https://github.com/mitmproxy/mitmproxy-rs"
3434edition = " 2021"
35- rust-version = " 1.86 " # MSRV
35+ rust-version = " 1.87 " # MSRV
3636
3737[workspace .dependencies ]
3838aya = { version = " 0.13.0" , default-features = false }
@@ -123,3 +123,6 @@ opt-level = 3
123123
124124[features ]
125125tracing = [" console-subscriber" ]
126+ # This feature solely exists to silence warnings caused by objc 0.2.7,
127+ # see https://github.com/SSheldon/rust-objc/issues/125
128+ cargo-clippy = []
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ impl Prettify for HexStream {
3838impl Reencode for HexStream {
3939 fn reencode ( & self , data : & str , _metadata : & dyn Metadata ) -> Result < Vec < u8 > > {
4040 let data = data. trim_end_matches ( [ '\n' , '\r' ] ) ;
41- if data. len ( ) % 2 != 0 {
41+ if data. len ( ) . is_multiple_of ( 2 ) {
4242 anyhow:: bail!( "Invalid hex string: uneven number of characters" ) ;
4343 }
4444 data_encoding:: HEXLOWER_PERMISSIVE
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ pub fn start_local_redirector(
100100 py : Python < ' _ > ,
101101 handle_tcp_stream : PyObject ,
102102 handle_udp_stream : PyObject ,
103- ) -> PyResult < Bound < PyAny > > {
103+ ) -> PyResult < Bound < ' _ , PyAny > > {
104104 #[ cfg( windows) ]
105105 {
106106 let executable_path: std:: path:: PathBuf = py
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ pub fn create_tun_interface(
6767 handle_tcp_stream : PyObject ,
6868 handle_udp_stream : PyObject ,
6969 tun_name : Option < String > ,
70- ) -> PyResult < Bound < PyAny > > {
70+ ) -> PyResult < Bound < ' _ , PyAny > > {
7171 #[ cfg( target_os = "linux" ) ]
7272 {
7373 let conf = mitmproxy:: packet_sources:: tun:: TunConf { tun_name } ;
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ pub fn start_udp_server(
5858 host : IpAddr ,
5959 port : u16 ,
6060 handle_udp_stream : PyObject ,
61- ) -> PyResult < Bound < PyAny > > {
61+ ) -> PyResult < Bound < ' _ , PyAny > > {
6262 let conf = UdpConf {
6363 listen_addr : SocketAddr :: from ( ( host, port) ) ,
6464 } ;
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ pub fn start_wireguard_server(
6969 peer_public_keys : Vec < String > ,
7070 handle_tcp_stream : PyObject ,
7171 handle_udp_stream : PyObject ,
72- ) -> PyResult < Bound < PyAny > > {
72+ ) -> PyResult < Bound < ' _ , PyAny > > {
7373 let private_key = string_to_key ( private_key) ?;
7474 let peer_public_keys = peer_public_keys
7575 . into_iter ( )
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ pub fn open_udp_connection(
2525 host : String ,
2626 port : u16 ,
2727 local_addr : Option < ( String , u16 ) > ,
28- ) -> PyResult < Bound < PyAny > > {
28+ ) -> PyResult < Bound < ' _ , PyAny > > {
2929 pyo3_async_runtimes:: tokio:: future_into_py ( py, async move {
3030 let socket = udp_connect ( host, port, local_addr) . await ?;
3131
Original file line number Diff line number Diff line change @@ -68,19 +68,14 @@ pub fn tiff_data_for_executable(executable: &Path) -> Result<Vec<u8>> {
6868 if executable == path. to_path_buf ( ) {
6969 let pid = pid. as_u32 ( ) ;
7070 unsafe {
71- #[ allow( unexpected_cfgs) ]
7271 let app: id = msg_send ! [
7372 class!( NSRunningApplication ) ,
7473 runningApplicationWithProcessIdentifier: pid
7574 ] ;
7675 if !app. is_null ( ) {
77- #[ allow( unexpected_cfgs) ]
7876 let img: id = msg_send ! [ app, icon] ;
79- #[ allow( unexpected_cfgs) ]
8077 let tiff: id = msg_send ! [ img, TIFFRepresentation ] ;
81- #[ allow( unexpected_cfgs) ]
8278 let length: usize = msg_send ! [ tiff, length] ;
83- #[ allow( unexpected_cfgs) ]
8479 let bytes: * const u8 = msg_send ! [ tiff, bytes] ;
8580 let data = std:: slice:: from_raw_parts ( bytes, length) . to_vec ( ) ;
8681 return Ok ( data) ;
You can’t perform that action at this time.
0 commit comments