Sign in
gn
/
gn.git
/
0ae75f90df148d19083055b29c4c940b136904b4
/
.
/
examples
/
rust_example
/
hello_world
/
bar
/
src
/
lib.rs
blob: 43defe93b5e8a4d91ade819dab4a4a1f0fa685be [
file
] [
log
] [
blame
]
#[
cfg
(
test
)]
mod
tests
{
#[
test
]
fn
it_works
()
{
assert_eq
!(
2
+
2
,
4
);
}
}
#[
derive
(
Debug
)]
pub
struct
Foo
{
s
:
&
'
static
str
,
i
:
&
'
static
str
}
impl
Foo
{
pub
fn
new
(
s
:
&
'
static
str
)
->
Foo
{
Foo
{
s
:
s
,
i
:
"bar"
}
}
}
pub
fn
answer
()
->
i32
{
42
}