mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
remove all assert in non-test code
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -109,7 +109,7 @@ impl SharedMemory {
|
||||
|
||||
pub fn write(&self, addr: usize, data: &[u8]) {
|
||||
unsafe {
|
||||
assert!(addr + data.len() <= self.inner.len());
|
||||
debug_assert!(addr + data.len() <= self.inner.len());
|
||||
let ptr = self.inner.as_ptr().add(addr);
|
||||
let shared_mem_slice = slice::from_raw_parts_mut(ptr, data.len());
|
||||
shared_mem_slice.copy_from_slice(data);
|
||||
|
||||
@@ -49,7 +49,7 @@ impl<T: Subscriber + From<ConnInner>> ServiceInner<T> {
|
||||
for (_, s) in self.new_subscribes.drain() {
|
||||
self.subscribes.insert(s.id(), s);
|
||||
}
|
||||
assert!(self.new_subscribes.is_empty());
|
||||
debug_assert!(self.new_subscribes.is_empty());
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user