fix intellij-rust nag about serialize_size
This commit is contained in:
		
							parent
							
								
									14a3f14b71
								
							
						
					
					
						commit
						74952f0678
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -131,7 +131,7 @@ impl LibretroApi {
 | 
			
		|||
    }
 | 
			
		||||
    /// Serializes internal state.
 | 
			
		||||
    pub fn serialize(&self) -> Fallible<Vec<u8>> {
 | 
			
		||||
        let size = unsafe { (&self.core_api.retro_serialize_size)() };
 | 
			
		||||
        let size: usize = unsafe { (&self.core_api.retro_serialize_size)() };
 | 
			
		||||
        let mut vec = Vec::with_capacity(size);
 | 
			
		||||
        vec.resize(size, 0);
 | 
			
		||||
        // FIXME: libretro-sys incorrectly says retro_serialize is a void(), not a bool()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -313,7 +313,7 @@ impl StaticCallbacks {
 | 
			
		|||
            }
 | 
			
		||||
            EnvCmd::GetUsername => Self::string_into_void(data, handler.get_username()?)?,
 | 
			
		||||
            EnvCmd::GetLanguage => Self::clone_into_void(data, &handler.get_language()?)?,
 | 
			
		||||
            // EnvCmd::SetSerializationQuirks => handler.set_serialization_quirks(Self::from_void(data)?),
 | 
			
		||||
            // TODO (not in libretro-sys) EnvCmd::SetSerializationQuirks => handler.set_serialization_quirks(Self::from_void(data)?),
 | 
			
		||||
            x => {
 | 
			
		||||
                if cfg!(debug) {
 | 
			
		||||
                    eprintln!("Known but unsupported env cmd: {:?}", x);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue