mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-26 00:11:49 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2de12aa34 | ||
|
|
2d544f18b5 | ||
|
|
0667ee7c4d | ||
|
|
19cee73209 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -11,3 +11,7 @@ rust-project.json
|
||||
!.vscode/extensions.json
|
||||
*.iml
|
||||
*.o
|
||||
public/
|
||||
|
||||
# Local Netlify folder
|
||||
.netlify
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
<a name="5.5.1"></a>
|
||||
## 5.5.1 (2023-05-17)
|
||||
|
||||
#### Fixed
|
||||
|
||||
- Reverted `rust-project.json` path generation due to an upstream `rust-analyzer` fix.
|
||||
|
||||
<a name="5.5.0"></a>
|
||||
## 5.5.0 (2023-05-17)
|
||||
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -441,7 +441,7 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
||||
|
||||
[[package]]
|
||||
name = "rustlings"
|
||||
version = "5.5.0"
|
||||
version = "5.5.1"
|
||||
dependencies = [
|
||||
"argh",
|
||||
"assert_cmd",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[package]
|
||||
name = "rustlings"
|
||||
version = "5.5.0"
|
||||
description = "Small exercises to get you used to reading and writing Rust code!"
|
||||
version = "5.5.1"
|
||||
authors = [
|
||||
"Liv <mokou@fastmail.com>",
|
||||
"Carol (Nichols || Goulding) <carol.nichols@gmail.com>",
|
||||
|
||||
12
README.md
12
README.md
@@ -1,5 +1,9 @@
|
||||
<div class="oranda-hide">
|
||||
|
||||
# rustlings 🦀❤️
|
||||
|
||||
</div>
|
||||
|
||||
Greetings and welcome to `rustlings`. This project contains small exercises to get you used to reading and writing Rust code. This includes reading and responding to compiler messages!
|
||||
|
||||
_...looking for the old, web-based version of Rustlings? Try [here](https://github.com/rust-lang/rustlings/tree/rustlings-1)_
|
||||
@@ -36,8 +40,8 @@ This will install Rustlings and give you access to the `rustlings` command. Run
|
||||
Basically: Clone the repository at the latest tag, finally run `nix develop` or `nix-shell`.
|
||||
|
||||
```bash
|
||||
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.5.0)
|
||||
git clone -b 5.5.0 --depth 1 https://github.com/rust-lang/rustlings
|
||||
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.5.1)
|
||||
git clone -b 5.5.1 --depth 1 https://github.com/rust-lang/rustlings
|
||||
cd rustlings
|
||||
# if nix version > 2.3
|
||||
nix develop
|
||||
@@ -74,8 +78,8 @@ If you get a permission denied message, you might have to exclude the directory
|
||||
Basically: Clone the repository at the latest tag, run `cargo install --path .`.
|
||||
|
||||
```bash
|
||||
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.5.0)
|
||||
git clone -b 5.5.0 --depth 1 https://github.com/rust-lang/rustlings
|
||||
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.5.1)
|
||||
git clone -b 5.5.1 --depth 1 https://github.com/rust-lang/rustlings
|
||||
cd rustlings
|
||||
cargo install --force --path .
|
||||
```
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
rustlings =
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
name = "rustlings";
|
||||
version = "5.5.0";
|
||||
version = "5.5.1";
|
||||
|
||||
buildInputs = cargoBuildInputs;
|
||||
|
||||
|
||||
10
oranda.json
Normal file
10
oranda.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"homepage": "https://rustlings.cool",
|
||||
"repository": "https://github.com/rust-lang/rustlings",
|
||||
"analytics": {
|
||||
"plausible": {
|
||||
"domain": "rustlings.cool"
|
||||
}
|
||||
},
|
||||
"changelog": true
|
||||
}
|
||||
@@ -26,7 +26,7 @@ mod run;
|
||||
mod verify;
|
||||
|
||||
// In sync with crate version
|
||||
const VERSION: &str = "5.5.0";
|
||||
const VERSION: &str = "5.5.1";
|
||||
|
||||
#[derive(FromArgs, PartialEq, Debug)]
|
||||
/// Rustlings is a collection of small exercises to get you used to writing and reading Rust code
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use glob::glob;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
use std::{env, fs};
|
||||
|
||||
/// Contains the structure of resulting rust-project.json file
|
||||
/// and functions to build the data required to create the file
|
||||
@@ -42,9 +42,8 @@ impl RustAnalyzerProject {
|
||||
fn path_to_json(&mut self, path: PathBuf) -> Result<(), Box<dyn Error>> {
|
||||
if let Some(ext) = path.extension() {
|
||||
if ext == "rs" {
|
||||
let abspath = fs::canonicalize(path)?;
|
||||
self.crates.push(Crate {
|
||||
root_module: abspath.display().to_string(),
|
||||
root_module: path.display().to_string(),
|
||||
edition: "2021".to_string(),
|
||||
deps: Vec::new(),
|
||||
// This allows rust_analyzer to work inside #[test] blocks
|
||||
|
||||
Reference in New Issue
Block a user