mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-22 21:18:53 +00:00
fix(idl_gen_rust): Fix lifetime warning added in Rust 1.89 (#8709)
Rust 1.89 added a new lifetime-related warning: <https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/#mismatched-lifetime-syntaxes-lint> The Rust code generator currently emits code which trips this warning. This very small PR fixes the issue for the relevant generated functions and for the Rust flexbuffers code. Fixes #8705
This commit is contained in:
@@ -36,13 +36,13 @@ impl<'a> VectorBuilder<'a> {
|
||||
}
|
||||
/// Starts a nested vector that will be pushed onto this vector when it is dropped.
|
||||
#[inline]
|
||||
pub fn start_vector(&mut self) -> VectorBuilder {
|
||||
pub fn start_vector(&mut self) -> VectorBuilder<'_> {
|
||||
let start = Some(self.builder.values.len());
|
||||
VectorBuilder { builder: self.builder, start }
|
||||
}
|
||||
/// Starts a nested map that will be pushed onto this vector when it is dropped.
|
||||
#[inline]
|
||||
pub fn start_map(&mut self) -> MapBuilder {
|
||||
pub fn start_map(&mut self) -> MapBuilder<'_> {
|
||||
let start = Some(self.builder.values.len());
|
||||
MapBuilder { builder: self.builder, start }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user