use log instead of print
This commit is contained in:
parent
625420c5f6
commit
0ae6ce5e88
10 changed files with 54 additions and 19 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use crate::{EncodedValue, Error, ReadSeek, Result, Serializable, Uleb128};
|
||||
use log::warn;
|
||||
use std::io::Write;
|
||||
|
||||
// To derive Serializable
|
||||
|
|
@ -60,9 +61,8 @@ impl Serializable for EncodedAnnotation {
|
|||
let mut idx_0 = elements[0].name_idx;
|
||||
for idx_1 in elements.iter().map(|elt| elt.name_idx).skip(1) {
|
||||
if idx_0 > idx_1 {
|
||||
// TODO: use proper logging
|
||||
println!(
|
||||
"Waring while deserializing EncodedAnnotation: element must be sorted in increasing order by string_id index, found {idx_0:?} before {idx_1:?}"
|
||||
warn!(
|
||||
"while deserializing EncodedAnnotation: element must be sorted in increasing order by string_id index, found {idx_0:?} before {idx_1:?}"
|
||||
);
|
||||
}
|
||||
idx_0 = idx_1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue