mirror of
https://github.com/RGBCube/cstree
synced 2025-07-27 09:07:44 +00:00
[Deps] Update criterion
to v0.5 (#64)
* [Deps] update criterion to 0.5 * make clippy happy --------- Co-authored-by: Domenic Quirl <DomenicQuirl@protonmail.com>
This commit is contained in:
parent
4d1c90a56f
commit
70e9f92d3e
5 changed files with 19 additions and 14 deletions
|
@ -50,7 +50,7 @@ m_lexer = "0.0.4"
|
|||
serde_json = "1.0"
|
||||
serde_test = "1.0"
|
||||
crossbeam-utils = "0.8"
|
||||
criterion = "0.3"
|
||||
criterion = { version = "0.5.1", features = ["html_reports"] }
|
||||
|
||||
[[bench]]
|
||||
name = "main"
|
||||
|
|
|
@ -131,7 +131,7 @@ impl PackedGreenElement {
|
|||
|
||||
pub(crate) fn into_node(self) -> Option<GreenNode> {
|
||||
if self.is_node() {
|
||||
unsafe { Some(mem::transmute(self)) }
|
||||
unsafe { Some(mem::transmute::<Self, GreenNode>(self)) }
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ impl PackedGreenElement {
|
|||
|
||||
pub(crate) fn into_token(self) -> Option<GreenToken> {
|
||||
if !self.is_node() {
|
||||
unsafe { Some(mem::transmute(self)) }
|
||||
unsafe { Some(mem::transmute::<Self, GreenToken>(self)) }
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -86,7 +86,11 @@
|
|||
|
||||
#![forbid(missing_debug_implementations, unconditional_recursion)]
|
||||
#![deny(unsafe_code, future_incompatible)]
|
||||
#![allow(unstable_name_collisions)] // strict provenance - must come after `future_incompatible` to take precedence
|
||||
#![allow(
|
||||
unstable_name_collisions, // strict provenance - must come after `future_incompatible` to take precedence
|
||||
unexpected_cfgs, // nightly docs.rs features and `salsa-2022` feature until that is figured out
|
||||
clippy::duplicated_attributes, // interning modules
|
||||
)]
|
||||
#![warn(missing_docs)]
|
||||
// Docs.rs
|
||||
#![doc(html_root_url = "https://docs.rs/cstree/0.12.0")]
|
||||
|
|
|
@ -400,6 +400,7 @@ impl<S: Syntax, D> SyntaxNode<S, D> {
|
|||
}
|
||||
|
||||
/// Returns the data associated with this node, if any.
|
||||
#[allow(clippy::useless_asref)] // make `Arc::clone` explicit
|
||||
pub fn get_data(&self) -> Option<Arc<D>> {
|
||||
let ptr = self.data().data.read();
|
||||
(*ptr).as_ref().map(Arc::clone)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue