Compare commits

..

12 commits

Author SHA1 Message Date
Silvestre Abruzzo 913a906fe7
Merge 40e2330e8d into c7a18b0781 2024-05-13 18:03:48 +03:00
Mo c7a18b0781
Merge pull request #1974 from hamirmahal/refactor/remove-referent-for-readability
refactor: remove `referent` to improve readability
2024-05-13 00:15:28 +02:00
Hamir Mahal 01a78531ad
refactor: remove referent to improve readability 2024-05-12 15:10:50 -07:00
Mo c2414b8891
Merge pull request #1951 from hamirmahal/ci/add-clippy-job-to-workflow
ci: add `clippy` job to `rust.yml` workflow
2024-05-12 22:47:45 +02:00
Mo f03020a7e2
Merge pull request #1961 from Allupeng/main
docs : add a comma in structs3.rs file
2024-05-12 22:46:07 +02:00
mo8it 01509a2a84 Remove comma 2024-05-12 22:45:18 +02:00
Mo 66b3a9cdd7
Merge pull request #1973 from iamcult/main
chore: update flake.lock
2024-05-12 22:25:54 +02:00
iamcult baca8c9667
chore: update flake.lock 2024-05-12 14:48:06 -04:00
allupeng 8c3b8dcec4 doc : add a dot in hashmaps1.rs file to fill e.g. 2024-04-29 14:18:04 +08:00
allupeng 881d3e9441 doc : add a dot in structs3.rs file 2024-04-28 18:03:22 +08:00
Hamir Mahal 4eec81a113
ci: add clippy job to rust.yml workflow 2024-04-17 01:35:53 -07:00
Hamir Mahal 9a13bccd63
chore: changes from formatting on save 2024-04-17 01:35:29 -07:00
4 changed files with 18 additions and 13 deletions

View file

@ -2,14 +2,19 @@ name: Rustlings Tests
on: on:
push: push:
branches: [ main ] branches: [main]
pull_request: pull_request:
branches: [ main ] branches: [main]
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
jobs: jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo clippy -- --deny warnings
fmt: fmt:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View file

@ -3,7 +3,7 @@
// A basket of fruits in the form of a hash map needs to be defined. The key // A basket of fruits in the form of a hash map needs to be defined. The key
// represents the name of the fruit and the value represents how many of that // represents the name of the fruit and the value represents how many of that
// particular fruit is in the basket. You have to put at least three different // particular fruit is in the basket. You have to put at least three different
// types of fruits (e.g apple, banana, mango) in the basket and the total count // types of fruits (e.g. apple, banana, mango) in the basket and the total count
// of all the fruits should be at least five. // of all the fruits should be at least five.
// //
// Make me compile and pass the tests! // Make me compile and pass the tests!

View file

@ -3,11 +3,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1673956053, "lastModified": 1696426674,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -21,11 +21,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1692799911, "lastModified": 1710146030,
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -36,11 +36,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1694183432, "lastModified": 1715447595,
"narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=", "narHash": "sha256-VsVAUQOj/cS1LCOmMjAGeRksXIAdPnFIjCQ0XLkCsT0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b", "rev": "062ca2a9370a27a35c524dc82d540e6e9824b652",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -378,7 +378,7 @@ path = "exercises/06_move_semantics/move_semantics5.rs"
mode = "test" mode = "test"
hint = """ hint = """
Carefully reason about the range in which each mutable reference is in Carefully reason about the range in which each mutable reference is in
scope. Does it help to update the value of referent (`x`) immediately after scope. Does it help to update the value of `x` immediately after
the mutable reference is taken? Read more about 'Mutable References' the mutable reference is taken? Read more about 'Mutable References'
in the book's section 'References and Borrowing': in the book's section 'References and Borrowing':
https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#mutable-references. https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#mutable-references.