mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-11-04 08:08:55 +08:00 
			
		
		
		
	Use expect() instead of unwrap() for string conversion
This commit is contained in:
		@@ -75,7 +75,7 @@ impl Statement<'_> {
 | 
			
		||||
        for i in 0..n {
 | 
			
		||||
            let name = self.column_name(i);
 | 
			
		||||
            let slice = self.stmt.column_decltype(i);
 | 
			
		||||
            let decl_type = slice.map(|s| str::from_utf8(s.to_bytes()).unwrap());
 | 
			
		||||
            let decl_type = slice.map(|s| str::from_utf8(s.to_bytes()).expect("Invalid UTF-8 sequence in column declaration"));
 | 
			
		||||
            cols.push(Column { name, decl_type });
 | 
			
		||||
        }
 | 
			
		||||
        cols
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user