File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# displayz
22
3- [ ![ MIT License] ( https://img.shields.io/crates/l/displayz )] ( https://choosealicense.com/licenses/mit/ ) [ ![ Continuous integration ] ( https://github.com/michidk/displayz/workflows/Continuous%20Integration /badge.svg )] ( https://github.com/michidk/displaz /actions ) [ ![ rust docs] ( https://docs.rs/displayz/badge.svg )] ( https://docs.rs/displayz/latest/displayz/ ) [ ![ Crates.io] ( https://img.shields.io/crates/v/displayz )] ( https://crates.io/crates/displayz )
3+ [ ![ MIT License] ( https://img.shields.io/crates/l/displayz )] ( https://choosealicense.com/licenses/mit/ ) [ ![ Continuous Integration ] ( https://github.com/michidk/displayz/actions/ workflows/ci.yaml /badge.svg )] ( https://github.com/michidk/displayz /actions/workflows/ci.yaml ) [ ![ rust docs] ( https://docs.rs/displayz/badge.svg )] ( https://docs.rs/displayz/latest/displayz/ ) [ ![ Crates.io] ( https://img.shields.io/crates/v/displayz )] ( https://crates.io/crates/displayz )
44[ ![ Chocolatey] ( https://img.shields.io/chocolatey/v/displayz?include_prereleases )] ( https://community.chocolatey.org/packages/displayz )
55
66A CLI tool and library to control display settings on Windows written in Rust.
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ impl DisplaySet {
130130
131131 // move all other displays to new position (because we set a new origin in the next step)
132132 for ( i, display) in self . displays . iter ( ) . enumerate ( ) {
133- if display. active && i != index as usize {
133+ if display. active && i != index {
134134 let settings = display
135135 . settings
136136 . as_ref ( )
@@ -141,7 +141,7 @@ impl DisplaySet {
141141 }
142142
143143 // the new primary is the new origin
144- let new_primary_mut = & self . displays [ index as usize ] ;
144+ let new_primary_mut = & self . displays [ index] ;
145145 let new_settings = new_primary_mut
146146 . settings
147147 . as_ref ( )
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ struct PropertiesOpt {
9292
9393/// Entry point for `displayz`.
9494fn main ( ) -> Result < ( ) > {
95- let _ = color_eyre:: install ( ) ?;
95+ color_eyre:: install ( ) ?;
9696
9797 let opts = Opts :: from_args ( ) ;
9898
@@ -102,10 +102,8 @@ fn main() -> Result<()> {
102102 log:: LevelFilter :: Info
103103 } ;
104104
105- let _ = env_logger:: Builder :: from_env (
106- env_logger:: Env :: default ( ) . default_filter_or ( log_level. as_str ( ) ) ,
107- )
108- . init ( ) ;
105+ env_logger:: Builder :: from_env ( env_logger:: Env :: default ( ) . default_filter_or ( log_level. as_str ( ) ) )
106+ . init ( ) ;
109107
110108 log:: debug!( "Parsed Opts:\n {:#?}" , opts) ;
111109
You can’t perform that action at this time.
0 commit comments