Skip to content

Commit a3e0e8b

Browse files
committed
Properly rename module
1 parent 2b2f066 commit a3e0e8b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
File renamed without changes.

cursive/examples/builder.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@ use cursive::views::{BoxedView, Button, EditView, Panel, TextView};
33
// This is how we can define some global blueprints.
44
// Here, we define a blueprint from a template.
55
cursive::manual_blueprint!(LabeledField from {
6-
// We just need to return a cursive::builder::Config here
6+
// We just need to return a cursive::builder::Config
77
// (in practice, a serde_json::Value).
8+
//
89
// Here we parse yaml but any other serde-supported language would work.
910
serde_yaml::from_str(include_str!("label-view.yaml")).unwrap()
1011
});
1112

1213
cursive::manual_blueprint!(VSpace from {
14+
// Another similar blueprint.
15+
//
1316
// Here we embed the template in the binary with `include_str!`,
1417
// but it'd be possible as well to dynamically read a file,
1518
// load from network, ...
19+
//
20+
// Note that this code only runs when this blueprint is actually called
21+
// (when a `VSpace` view is requested).
1622
serde_yaml::from_str(include_str!("vspace.yaml")).unwrap()
1723
});
1824

0 commit comments

Comments
 (0)