Skip to content

Commit

Permalink
Fixed static lifetimes
Browse files Browse the repository at this point in the history
  • Loading branch information
farcaller committed Jul 21, 2014
1 parent 04e81fb commit e6eee41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hal/k20/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ enum ParitySelect {
}

impl UARTPeripheral {
fn reg(self) -> &reg::UART {
fn reg(self) -> &'static reg::UART {

This comment has been minimized.

Copy link
@bgamari

bgamari Jul 23, 2014

r+

match self {
UART0 => &reg::UART0,
UART1 => &reg::UART1,
Expand Down
2 changes: 1 addition & 1 deletion src/hal/lpc17xx/peripheral_clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl PeripheralClock {
}
}

fn divisor_reg_and_offset(self) -> (&reg::PCLKSEL, u32) {
fn divisor_reg_and_offset(self) -> (&'static reg::PCLKSEL, u32) {
match self.to_divisor() {
WDTDivisor|TIMER0Divisor|TIMER1Divisor|UART0Divisor|UART1Divisor|
PWM1Divisor|I2C0Divisor|SPIDivisor|SSP1Divisor|DACDivisor|ADCDivisor|
Expand Down
2 changes: 1 addition & 1 deletion src/hal/lpc17xx/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub struct UART {
}

impl UARTPeripheral {
fn reg(self) -> &reg::UART {
fn reg(self) -> &'static reg::UART {
match self {
UART0 => &reg::UART0,
UART2 => &reg::UART2,
Expand Down

1 comment on commit e6eee41

@farcaller
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=bgamari

Please sign in to comment.