mirror of
https://git.mentality.rip/numas13/xash3d-master.git
synced 2025-01-22 04:44:31 +00:00
protocol: rename remaining into available
This commit is contained in:
parent
df3e1b23be
commit
dfb702f58d
@ -405,7 +405,7 @@ impl<'a> CursorMut<'a> {
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn remaining(&self) -> usize {
|
||||
pub fn available(&self) -> usize {
|
||||
self.buffer.len() - self.pos
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ impl<'a> CursorMut<'a> {
|
||||
where
|
||||
F: FnMut(&mut [u8]),
|
||||
{
|
||||
if count <= self.remaining() {
|
||||
if count <= self.available() {
|
||||
f(&mut self.buffer[self.pos..self.pos + count]);
|
||||
self.pos += count;
|
||||
Ok(self)
|
||||
|
@ -180,7 +180,7 @@ impl QueryServersResponse<()> {
|
||||
}
|
||||
let mut count = 0;
|
||||
let mut iter = list.iter();
|
||||
while cur.remaining() >= A::size() * 2 {
|
||||
while cur.available() >= A::size() * 2 {
|
||||
if let Some(i) = iter.next() {
|
||||
i.put(&mut cur)?;
|
||||
count += 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user