diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2014-03-21 10:16:41 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2014-03-21 14:54:56 -0700 |
commit | 79ca9b6eb00e5a5945f03221227a43919f67caa4 (patch) | |
tree | fcdc17aae1a720f782ab703f7a2a603372579468 /src/components/script/macros.rs | |
parent | 831712206865e2c0516009b16e2ac60f754dd1a8 (diff) | |
download | servo-79ca9b6eb00e5a5945f03221227a43919f67caa4.tar.gz servo-79ca9b6eb00e5a5945f03221227a43919f67caa4.zip |
Move common macros into a new crate (fixes #1882)
Diffstat (limited to 'src/components/script/macros.rs')
-rw-r--r-- | src/components/script/macros.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/components/script/macros.rs b/src/components/script/macros.rs deleted file mode 100644 index 0ebdd7c6b7e..00000000000 --- a/src/components/script/macros.rs +++ /dev/null @@ -1,24 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#[macro_escape]; - -macro_rules! bitfield( - ($bitfieldname:ident, $getter:ident, $setter:ident, $value:expr) => ( - impl $bitfieldname { - #[inline] - pub fn $getter(self) -> bool { - let $bitfieldname(s) = self; - (s & $value) != 0 - } - - #[inline] - pub fn $setter(&mut self, value: bool) { - let $bitfieldname(s) = *self; - *self = $bitfieldname((s & !$value) | (if value { $value } else { 0 })) - } - } - ) -) - |