fn recompute_scale(&self, outputs: &std::collections::HashSet<u32>) -> i32 {
        let compositor = match self.inner.upgrade() {
            Some(c) => c,
            None => panic!("should never recompute scale of window that has been dropped"),
        };
        tracing::debug!("computing scale using {:?} outputs", outputs.len());
        let scale = outputs.iter().fold(0, |scale, id| {
            tracing::debug!("recomputing scale using output {:?}", id);
            match compositor.output(*id) {
                None => {
                    tracing::warn!(
                        "we still have a reference to an output that's gone away. The output had id {}",
                        id,
                    );
                    scale
                },
                Some(output) => scale.max(output.scale as i32),
            }
        });

        match scale {
            0 => {
                tracing::warn!("wayland never reported which output we are drawing to");
                1
            }
            scale => scale,
        }
    }
/// Recompute the scale to use (the maximum of all the provided outputs).
Recompute the scale to use (the maximum of all the provided outputs).
Recompute the scale to use ( the maximum of all the provided outputs ) .
fn recompute_scale(&self, outputs: &std::collections::HashSet<u32>) -> i32 {
        let compositor = match self.inner.upgrade() {
            Some(c) => c,
            None => panic!("should never recompute scale of window that has been dropped"),
        };
        tracing::debug!("computing scale using {:?} outputs", outputs.len());
        let scale = outputs.iter().fold(0, |scale, id| {
            tracing::debug!("recomputing scale using output {:?}", id);
            match compositor.output(*id) {
                None => {
                    tracing::warn!(
                        "we still have a reference to an output that's gone away. The output had id {}",
                        id,
                    );
                    scale
                },
                Some(output) => scale.max(output.scale as i32),
            }
        });
        match scale {
            0 => {
                tracing::warn!("wayland never reported which output we are drawing to");
                1
            }
            scale => scale,
        }
    }
fn recompute_scale ( & self , outputs : & std :: collections :: HashSet < u32 > ) -> i32 { let compositor = match self . inner . upgrade ( ) { Some ( c ) => c , None => panic ! ( " " ) , } ; tracing :: debug ! ( " " outputs len ( ) ) ; let scale = outputs . iter ( ) . fold ( 0 , | scale , id | { tracing :: debug ! ( " " id ) ; match compositor . output ( * id ) { None => { tracing :: warn ! ( " " id ) ; scale } , Some ( output ) => scale . max ( output . scale as i32 ) , } } ) ; match scale { 0 => { tracing :: warn ! ( " " ) ; 1 } scale => scale , } }
Recompute the scale to use (the maximum of all the provided outputs).
Recompute the scale to use ( the maximum of all the provided outputs ) .
&self
outputs
&std::collections::HashSet<u32>
&self
outputs
&std::collections::HashSet<u32>