File tree 2 files changed +16
-1
lines changed 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -115,14 +115,17 @@ directory](https://github.com/jj-vcs/jj/tree/main/cli/src/commands). Working
115
115
on them requires setting up a Rust development environment, as described
116
116
below, and may occasionally require adjusting a test.
117
117
118
-
119
118
## Learning Rust
120
119
121
120
In addition to the [ Rust Book] ( https://doc.rust-lang.org/book/ ) and the other
122
121
excellent resources at < https://www.rust-lang.org/learn > , we recommend the
123
122
[ "Comprehensive Rust" mini-course] ( https://google.github.io/comprehensive-rust/ )
124
123
for an overview, especially if you are familiar with C++.
125
124
125
+ ## Style guide
126
+
127
+ See [ here] ( style_guide.md ) .
128
+
126
129
## Setting up a development environment
127
130
128
131
To develop ` jj ` , the mandatory steps are simply
Original file line number Diff line number Diff line change
1
+ # Style guide
2
+
3
+ ## Panics
4
+
5
+ Panics are not allowed, especially in code that may run on a server. Calling
6
+ ` .unwrap() ` is okay if it's guaranteed to be safe by previous checks or
7
+ documented invariants. For example, if a function is documented as requiring
8
+ a non-empty slice as input, it's fine to call ` slice[0] ` and panic.
9
+
10
+ ## Markdown
11
+
12
+ Try to wrap at 80 columns. We don't have a formatter yet.
You can’t perform that action at this time.
0 commit comments