Code cleanup.
This commit is contained in:
12
src/ast.rs
12
src/ast.rs
@@ -91,7 +91,7 @@ impl fmt::Display for ScriptFnDef {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"{}{}({}) -> Dynamic",
|
||||
"{}{}({})",
|
||||
if self.access.is_private() {
|
||||
"private "
|
||||
} else {
|
||||
@@ -133,7 +133,7 @@ impl fmt::Display for ScriptFnMetadata<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"{}{}({}) -> Dynamic",
|
||||
"{}{}({})",
|
||||
if self.access.is_private() {
|
||||
"private "
|
||||
} else {
|
||||
@@ -646,7 +646,7 @@ impl AsRef<Module> for AST {
|
||||
/// ## WARNING
|
||||
///
|
||||
/// This type is volatile and may change.
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
|
||||
#[derive(Clone, Eq, PartialEq, Hash)]
|
||||
pub struct Ident {
|
||||
/// Identifier name.
|
||||
pub name: ImmutableString,
|
||||
@@ -654,6 +654,12 @@ pub struct Ident {
|
||||
pub pos: Position,
|
||||
}
|
||||
|
||||
impl fmt::Debug for Ident {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "Ident({:?} @ {:?})", self.name, self.pos)
|
||||
}
|
||||
}
|
||||
|
||||
/// _(INTERNALS)_ A type encapsulating the mode of a `return`/`throw` statement.
|
||||
/// Exported under the `internals` feature only.
|
||||
///
|
||||
|
Reference in New Issue
Block a user