commit | c460b376c22d9e73fad112194c02a133c92d6a03 | [log] [tgz] |
---|---|---|
author | Andrew Cann <shum@canndrew.org> | Fri Jun 01 16:58:47 2018 +0800 |
committer | Andrew Cann <shum@canndrew.org> | Fri Jun 01 16:58:47 2018 +0800 |
tree | 919c7519f18eee103958a639ab97604e6dbc2c61 | |
parent | 6578c7c7d15fa0e6174bab9c8144b4c43ee703fa [diff] |
make dox::mem::size_of a const fn
diff --git a/src/dox.rs b/src/dox.rs index 941b65c..91fd7f7 100644 --- a/src/dox.rs +++ b/src/dox.rs
@@ -160,6 +160,6 @@ pub mod mem { pub fn size_of_val<T>(_: &T) -> usize { 4 } - pub fn size_of<T>() -> usize { 4 } + pub const fn size_of<T>() -> usize { 4 } } }