styling
This commit is contained in:
parent
27afb6247b
commit
15cafc6dae
|
@ -9,9 +9,16 @@ int ret19() {
|
|||
|
||||
char* structInfo(MyStruct *st) {
|
||||
char* buf = malloc(1024*sizeof(char));
|
||||
/* snprintf(buf, sizeof(buf), "foo: %d\n", st->foo); */
|
||||
/* snprintf(buf, sizeof(buf), "bar: %c", st->bar); */
|
||||
sprintf(buf,"Infos about the struct:\nfoo:\t%d\nbar:\t%c\n\ngreetings from C", st->foo, st->bar);
|
||||
sprintf(buf,
|
||||
"Infos about the struct:\n"
|
||||
"\tfoo:\t%d\n"
|
||||
"\tbar:\t%c\n"
|
||||
"\n"
|
||||
"greetings from C"
|
||||
,
|
||||
st->foo,
|
||||
st->bar
|
||||
);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
///
|
||||
/// we could simply do this to compile the test lib to a static lib,
|
||||
/// but that solution might not scale as good as calling a professional
|
||||
/// build system
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
fn main() {
|
||||
println!(
|
||||
"This is the default executable! It does not do much, use another executable.
|
||||
"SUCCESS!!!
|
||||
This is the default executable! It does not do much, use another executable.
|
||||
|
||||
Select your target like this:
|
||||
`cargo run --bin $TARGET`
|
||||
|
|
Loading…
Reference in New Issue