Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
caelansar committed Apr 4, 2024
1 parent dbc5b28 commit a0e7bf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update copyright year(s) in license file
name: update copyright year(s) in license file

on: workflow_dispatch

Expand All @@ -11,4 +11,4 @@ jobs:
fetch-depth: 0
- uses: FantasticFiasco/action-update-license-year@v3
with:
token: ${{ secrets.TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions src/eval/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fn push(args: Vec<Rc<Object>>) -> Object {
}

let obj = args.get(1).unwrap();
let arr = args.get(0).unwrap();
let arr = args.first().unwrap();

if let Object::Array(mut arr) = (*arr.as_ref()).clone() {
arr.push((*obj.as_ref()).clone());
Expand All @@ -106,7 +106,7 @@ fn first(args: Vec<Rc<Object>>) -> Object {
return Object::Error(format!("invalid args number: {:?}", args));
}

let arr = args.get(0).unwrap().clone();
let arr = args.first().unwrap().clone();

if let Object::Array(arr) = &*arr {
arr.first().cloned().unwrap_or(Object::Null)
Expand All @@ -120,7 +120,7 @@ fn last(args: Vec<Rc<Object>>) -> Object {
return Object::Error("invalid args number".into());
}

let arr = args.get(0).unwrap().clone();
let arr = args.first().unwrap().clone();

if let Object::Array(arr) = &*arr {
arr.last().cloned().unwrap_or(Object::Null)
Expand All @@ -134,7 +134,7 @@ fn rest(args: Vec<Rc<Object>>) -> Object {
return Object::Error("invalid args number".into());
}

let arr = args.get(0).unwrap().clone();
let arr = args.first().unwrap().clone();

if let Object::Array(arr) = &*arr {
arr.split_first()
Expand Down

0 comments on commit a0e7bf2

Please sign in to comment.