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:
Casper
2020-07-25 13:46:20 -07:00
committed by GitHub
parent d76e93f277
commit 18b015d25a
8 changed files with 121 additions and 147 deletions

View File

@@ -28,9 +28,7 @@ impl<'a> flatbuffers::Follow<'a> for ScalarStuff<'a> {
type Inner = ScalarStuff<'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 } }
}
}