Add Circle to basic_shape.rs

This commit is contained in:
Manish Goregaokar 2016-08-01 16:10:17 +05:30
parent 44e33bcdc5
commit 77f345476f
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98
3 changed files with 88 additions and 4 deletions

View file

@ -49,7 +49,7 @@ pub enum PositionComponent {
}
impl Position {
fn new(first: PositionComponent, second: PositionComponent)
pub fn new(first: PositionComponent, second: PositionComponent)
-> Result<Position, ()> {
let (horiz, vert) = match (category(first), category(second)) {
// Don't allow two vertical keywords or two horizontal keywords.