mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 20:55:43 +00:00
Rust codegen improvements and lint fixes (#6046)
* Improve rust codegen * one more unneeded lifetime * Added a derive default Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
@@ -20,9 +20,7 @@ impl<'a> flatbuffers::Follow<'a> for TableA<'a> {
|
||||
type Inner = TableA<'a>;
|
||||
#[inline]
|
||||
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||
Self {
|
||||
_tab: flatbuffers::Table { buf: buf, loc: loc },
|
||||
}
|
||||
Self { _tab: flatbuffers::Table { buf, loc } }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +49,7 @@ impl<'a> TableA<'a> {
|
||||
}
|
||||
|
||||
pub struct TableAArgs<'a> {
|
||||
pub b: Option<flatbuffers::WIPOffset<my_game::other_name_space::TableB<'a >>>,
|
||||
pub b: Option<flatbuffers::WIPOffset<my_game::other_name_space::TableB<'a>>>,
|
||||
}
|
||||
impl<'a> Default for TableAArgs<'a> {
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user