Skip to content

Commit

Permalink
chore(release): bump to 0.14.3 (#443)
Browse files Browse the repository at this point in the history
* Minor readme improvments (#442)

* chore: move the release process to its own file

* chore: remove extra whitespace in rust code block

* chore: better with a title :) !

* chore(book): add simple calculator example (#439)

* chore(book): add simple calculator example

* fix(book): footnote

* Apply suggestions from code review

Co-authored-by: Jérome Eertmans <[email protected]>

* Partially apply a suggestion from code review

* fix(book): add clone instructions to the simple calculator example

* chore(book): add the contributor info to the simple calculator example

---------

Co-authored-by: ynn <[email protected]>
Co-authored-by: Jérome Eertmans <[email protected]>

* chore(release): bump version

* chore(release): replace version in docs

* chore(lint): apply Clippy and Rustfmt

* chore(lint): allow needless lifetime

---------

Co-authored-by: tk <[email protected]>
Co-authored-by: ynn <[email protected]>
Co-authored-by: ynn <[email protected]>
  • Loading branch information
4 people authored Dec 2, 2024
1 parent 837d5bf commit 04ff39e
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/maciejhirsz/logos"
rust-version = "1.74.0"
version = "0.14.2"
version = "0.14.3"

[package]
name = "logos"
Expand Down Expand Up @@ -67,7 +67,7 @@ bench = {lto = true}
release = {lto = true}

[dependencies]
logos-derive = {version = "0.14.2", path = "./logos-derive", optional = true}
logos-derive = {version = "0.14.3", path = "./logos-derive", optional = true}

[dev-dependencies]
ariadne = {version = "0.4", features = ["auto-color"]}
Expand Down
2 changes: 1 addition & 1 deletion book/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```toml
[dependencies]
logos = "0.14.2"
logos = "0.14.3"
```

Then, you can automatically derive the [`Logos`](https://docs.rs/logos/latest/logos/trait.Logos.html) trait on your `enum` using the `Logos` derive macro:
Expand Down
2 changes: 1 addition & 1 deletion logos-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
anyhow = "1.0.57"
clap = {version = "3.1.18", features = ["derive"]}
fs-err = "2.7.0"
logos-codegen = {version = "0.14.2", path = "../logos-codegen"}
logos-codegen = {version = "0.14.3", path = "../logos-codegen"}
proc-macro2 = "1.0.39"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion logos-codegen/src/generator/fork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::util::ToIdent;

type Targets = Map<NodeId, Vec<Range>>;

impl<'a> Generator<'a> {
impl Generator<'_> {
pub fn generate_fork(&mut self, this: NodeId, fork: &Fork, mut ctx: Context) -> TokenStream {
let mut targets: Targets = Map::default();

Expand Down
2 changes: 1 addition & 1 deletion logos-codegen/src/generator/leaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::generator::{Context, Generator};
use crate::leaf::{Callback, Leaf};
use crate::util::MaybeVoid;

impl<'a> Generator<'a> {
impl Generator<'_> {
pub fn generate_leaf(&mut self, leaf: &Leaf, mut ctx: Context) -> TokenStream {
let bump = ctx.bump();

Expand Down
2 changes: 1 addition & 1 deletion logos-codegen/src/generator/rope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use quote::quote;
use crate::generator::{Context, Generator};
use crate::graph::Rope;

impl<'a> Generator<'a> {
impl Generator<'_> {
pub fn generate_rope(&mut self, rope: &Rope, mut ctx: Context) -> TokenStream {
let miss = ctx.miss(rope.miss.first(), self);
let read = ctx.read(rope.pattern.len());
Expand Down
2 changes: 1 addition & 1 deletion logos-codegen/src/graph/fork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub struct ForkIter<'a> {
lut: &'a [Option<NodeId>; 256],
}

impl<'a> Iterator for ForkIter<'a> {
impl Iterator for ForkIter<'_> {
type Item = (Range, NodeId);

fn next(&mut self) -> Option<Self::Item> {
Expand Down
2 changes: 1 addition & 1 deletion logos-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[dependencies]
logos-codegen = {version = "0.14.2", path = "../logos-codegen"}
logos-codegen = {version = "0.14.3", path = "../logos-codegen"}

[features]
# Enables debug messages
Expand Down
7 changes: 5 additions & 2 deletions src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,10 @@ where
T: Deref,
<T as Deref>::Target: Source,
{
type Slice<'a> = <T::Target as Source>::Slice<'a>
where T: 'a;
type Slice<'a>
= <T::Target as Source>::Slice<'a>
where
T: 'a;

fn len(&self) -> usize {
self.deref().len()
Expand Down Expand Up @@ -304,6 +306,7 @@ pub trait Chunk<'source>: Sized + Copy + PartialEq + Eq {
fn from_slice(s: &'source [u8]) -> Option<Self>;
}

#[allow(clippy::needless_lifetimes)]
impl<'source> Chunk<'source> for u8 {
const SIZE: usize = 1;

Expand Down
5 changes: 4 additions & 1 deletion tests/tests/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ use logos_derive::Logos;
struct RefSource<'s, S: ?Sized + Source>(&'s S);

impl<'s, S: ?Sized + Source> Source for RefSource<'s, S> {
type Slice<'a> = S::Slice<'a> where 's: 'a;
type Slice<'a>
= S::Slice<'a>
where
's: 'a;

fn len(&self) -> usize {
self.0.len()
Expand Down

0 comments on commit 04ff39e

Please sign in to comment.