Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Commit 8abc4cd

Browse files
committed
Merge pull request #116 from farcaller/fix-lifetimes
Fixed static lifetimes Reviewed-by: bgamari
2 parents 04e81fb + e6eee41 commit 8abc4cd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/hal/k20/uart.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ enum ParitySelect {
7878
}
7979

8080
impl UARTPeripheral {
81-
fn reg(self) -> &reg::UART {
81+
fn reg(self) -> &'static reg::UART {
8282
match self {
8383
UART0 => &reg::UART0,
8484
UART1 => &reg::UART1,

src/hal/lpc17xx/peripheral_clock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl PeripheralClock {
195195
}
196196
}
197197

198-
fn divisor_reg_and_offset(self) -> (&reg::PCLKSEL, u32) {
198+
fn divisor_reg_and_offset(self) -> (&'static reg::PCLKSEL, u32) {
199199
match self.to_divisor() {
200200
WDTDivisor|TIMER0Divisor|TIMER1Divisor|UART0Divisor|UART1Divisor|
201201
PWM1Divisor|I2C0Divisor|SPIDivisor|SSP1Divisor|DACDivisor|ADCDivisor|

src/hal/lpc17xx/uart.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub struct UART {
113113
}
114114

115115
impl UARTPeripheral {
116-
fn reg(self) -> &reg::UART {
116+
fn reg(self) -> &'static reg::UART {
117117
match self {
118118
UART0 => &reg::UART0,
119119
UART2 => &reg::UART2,

0 commit comments

Comments
 (0)