Difficult to say. If you've got AppleCare, it should be easy (and fast) to get a replacement or recover your data. I think my point was that a Raspberry Pi will break (I've got one and it and it's associated peripherals don't exactly fill me with confidence: mine gets upset if I try to use both a mouse and an ethernet connection and likes to reboot randomly).
A MacBook air, on the other hand, is a very well engineered machine: all solid state storage, aluminum unibody case and LED backlight (more reliable than CCFL) should mean that it'll run for many, many years without fault. My plastic cased MacBook is six years old has put up with all kinds of abuse but still runs like new. From what I hear, this isn't the exception to the rule.