Skip to content
Snippets Groups Projects
Commit 7900f8c8 authored by Max New's avatar Max New
Browse files

add submission zip script, fix compilation errors

parent 28502f81
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,12 @@ least) the following files:
2. `src/lib.rs`
3. `src/arith.rs`
If you get a compilation error, make sure that your zip file contains
the files themselves, not the directory containing them. That is,
running `unzip submission.zip` in an empty directory `tmp` should
add `Cargo.toml`, and a directory `src` directly to `tmp`.
The simplest way to do this is to use the `mk-submission.sh` script
included in this directory, which will create a file `submission.zip`
that includes the above files.
If you get an error that says you did not include the above files,
make sure that your zip file contains the files themselves, not the
directory containing them. That is, running `unzip submission.zip` in
an empty directory `tmp` should add `Cargo.toml`, and a directory
`src` directly to `tmp`.
#!/bin/bash
zip -r submission.zip Cargo.toml src/arith.rs src/lib.rs
......@@ -58,7 +58,7 @@ pub enum Arith {
correct value for x is 2.
*/
/* ARITH EXERCISE 0: Env */
fn get(env: &[(&str, i32)], x: &str) -> Option<i32> {
pub fn get(env: &[(&str, i32)], x: &str) -> Option<i32> {
panic!("NYI: get");
}
......
......@@ -35,7 +35,9 @@ mod smallest_string_tests {
* slices to get an Option and either use pattern matching or the `?`
* operator to implement the correct behavior.
*/
pub fn add_them_up(v: &[i32]) -> Option<i32> {}
pub fn add_them_up(v: &[i32]) -> Option<i32> {
panic!("not yet implemented: add_them_up")
}
#[cfg(test)]
mod add_them_up_tests {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment