Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed Aug 4, 2024
1 parent ad23ddb commit 4b4ff20
Show file tree
Hide file tree
Showing 7 changed files with 1,485 additions and 1,484 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["stable", "1.73.0"]
version: ["stable", "1.74.0"]
features: ["", "--all-features"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions muse-lang/src/compiler/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3742,6 +3742,7 @@ impl Fn {
let func = Self::parse_function_definition(publish, r#fn, tokens, config)?;
Ok(tokens.ranged(start.., Expression::Function(Box::new(func))))
}

fn parse_function_definition(
publish: Option<Ranged<Symbol>>,
r#fn: Ranged<Token>,
Expand Down
4 changes: 2 additions & 2 deletions muse-lang/src/runtime/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ use refuse::{AnyRef, AnyRoot, CollectionGuard, ContainsNoRefs, MapAs, Ref, Root,

use crate::runtime::string::MuseString;
use crate::runtime::symbol::{Symbol, SymbolList, SymbolRef};
use crate::vm::{Arity, ExecutionError, Fault, VmContext};

#[cfg(feature = "dispatched")]
use crate::runtime::types::{RuntimeEnum, RuntimeStruct};
#[cfg(feature = "dispatched")]
use crate::vm::bitcode::{BitcodeFunction, ValueOrSource};
#[cfg(feature = "dispatched")]
use crate::vm::Function;
use crate::vm::{Arity, ExecutionError, Fault, VmContext};

/// A Muse virtual machine value.
#[derive(Default, Clone, Copy, Debug)]
Expand Down Expand Up @@ -63,6 +62,7 @@ impl Value {
Value::Dynamic(v) => v.upgrade(guard).map(RootedValue::Dynamic),
}
}

/// Moves `value` into the virtual machine.
pub fn dynamic<'guard, T>(value: T, guard: impl AsRef<CollectionGuard<'guard>>) -> Self
where
Expand Down
1 change: 1 addition & 0 deletions muse-lang/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2841,6 +2841,7 @@ struct Budget(usize);

impl Budget {
const DISABLED: usize = usize::MAX;

fn allocate(&mut self, amount: usize) {
if self.0 == Self::DISABLED {
self.0 = amount;
Expand Down
Loading

0 comments on commit 4b4ff20

Please sign in to comment.