Skip to content

Commit

Permalink
feat(verifier): suppress dead code warning (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
doitian committed Mar 28, 2019
1 parent 8ea5018 commit 4209251
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cfb/templates/legacy_verifier.rs.jinja
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/ckb_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/data_alignment_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/data_order_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/enum_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/enum_vector_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/nested_buffer_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/scalar_vector_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/scalars_with_same_size_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/string_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/string_vector_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/struct_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/struct_vector_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/table_field_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/table_fields_order_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/table_vector_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down
2 changes: 2 additions & 0 deletions tests/common/union_generated_verifier.rs
Expand Up @@ -46,6 +46,7 @@ pub fn try_follow_uoffset(buf: &[u8], offset_loc: usize) -> result::Result<usize
try_read_uoffset(buf, offset_loc).map(|offset| offset_loc + offset)
}

#[allow(dead_code)]
pub struct StringVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down Expand Up @@ -75,6 +76,7 @@ impl<'a> Verify for StringVerifier<'a> {
}
}

#[allow(dead_code)]
pub struct VectorVerifier<'a> {
buf: &'a [u8],
loc: usize,
Expand Down

0 comments on commit 4209251

Please sign in to comment.