pub(crate) fn determine_limit(&self, max: usize) -> i32 {
        if let Some(limit) = self.limit {
            if self.fetched < limit {
                (limit - self.fetched).min(max) as i32
            } else {
                1 // 0 would cause Telegram to send a default amount and not actually 0
            }
        } else {
            max as i32
        }
    }
/// Determines the new "limit" for the request, so that no unnecessary items are fetched from
/// the network.
Determines the new "limit" for the request, so that no unnecessary items are fetched from
the network.
Determines the new " limit " for the request so that no unnecessary items are fetched from the network .
pub(crate) fn determine_limit(&self, max: usize) -> i32 {
        if let Some(limit) = self.limit {
            if self.fetched < limit {
                (limit - self.fetched).min(max) as i32
            } else {
                1 // 0 would cause Telegram to send a default amount and not actually 0
            }
        } else {
            max as i32
        }
    }
pub ( crate ) fn determine_limit ( & self , max : usize ) -> i32 { if let Some ( limit ) = self . limit { if self . fetched < limit { ( limit - self . fetched ) . min ( max ) as i32 } else { 1 // 0 would cause Telegram to send a default amount and not actually 0 } } else { max as i32 } }
Determines the new "limit" for the request, so that no unnecessary items are fetched from
the network.
Determines the new " limit " for the request so that no unnecessary items are fetched from the network .
&self
max
usize
&self
max
usize