Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
strategy:
matrix:
rust-version: ["1.70.0", "1.74.0", "1.78.0", "1.83.0", "1.87.0"]
rust-version: ["1.78.0", "1.83.0", "1.87.0", "1.99.0"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -25,7 +25,7 @@ jobs:
build-no_std:
strategy:
matrix:
rust-version: ["1.70.0", "1.74.0", "1.78.0", "1.83.0", "1.87.0"]
rust-version: ["1.78.0", "1.83.0", "1.87.0", "1.99.0"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -38,7 +38,7 @@ jobs:
test:
strategy:
matrix:
rust-version: ["1.70.0", "1.74.0", "1.78.0", "1.83.0", "1.87.0"]
rust-version: ["1.78.0", "1.83.0", "1.87.0", "1.99.0"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -50,7 +50,7 @@ jobs:
test-no_std:
strategy:
matrix:
rust-version: ["1.70.0", "1.74.0", "1.78.0", "1.83.0", "1.87.0"]
rust-version: ["1.78.0", "1.83.0", "1.87.0", "1.99.0"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -62,7 +62,7 @@ jobs:
clippy:
strategy:
matrix:
rust-version: ["1.70.0", "1.74.0", "1.78.0", "1.83.0", "1.87.0"]
rust-version: ["1.78.0", "1.83.0", "1.87.0", "1.99.0"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "anybuf"
version = "1.0.0"
edition = "2021"
rust-version = "1.78"
license = "Apache-2.0"
description = "A minimal, zero dependency proto3 encoder to encode/decode anything. No schemas needed."
keywords = ["protobuf3", "protobuf", "proto3", "proto", "encoding"]
Expand Down
6 changes: 5 additions & 1 deletion src/bufany.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ impl<'a> Bufany<'a> {

/// Gets the value of the given field number. This returns None if
/// the field number does not exist
pub fn value(&self, field_number: u32) -> Option<Value> {
pub fn value(&self, field_number: u32) -> Option<Value<'_>> {
self.value_ref(field_number).cloned()
}

Expand All @@ -866,6 +866,10 @@ impl<'a> Bufany<'a> {
}

/// A deserialized value
///
/// The lifetime `'a` is the lifetime of the serialized input: variable length values
/// (i.e. bytes and strings) borrow their bytes from it instead of copying them (zero-copy).
/// When `Value<'a>` is cloned, the clone still borrows the original data.
#[derive(Debug, PartialEq, Clone)]
pub enum Value<'a> {
/// Unknown varint (wire type = 0).
Expand Down
Loading