Skip to content

Commit 3e6ec82

Browse files
slongfieldCobrand
authored andcommitted
Make getting-started example copy-paste friendly
Make getting-started example copy-paste friendly by adding "extern crate sdl2;" line. When I was starting to read the docs, the first thing I did was copy-paste this example into a file to play with it but without this line, it doesn't compile (easy enough to fix, but wanted to fix it at the source). From reading the contributing guidelines, this appears to be small enough/documentation only, so I didn't think it required a changelog update.
1 parent 5d2d9a7 commit 3e6ec82

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sdl2/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//! # Getting started
22
//!
33
//! ```rust,no_run
4+
//! extern crate sdl2;
5+
//!
46
//! use sdl2::pixels::Color;
57
//! use sdl2::event::Event;
68
//! use sdl2::keyboard::Keycode;

0 commit comments

Comments
 (0)