If I buy a stock and sell within 30 days at a loss and never buy it back, does it trigger wash sale rule?

I been thinking the rule only applied to sell and buy with a loss within 30 days until today I researched online again and looks like if we buy a stock and sell within 30 days it also triggers wash sale rule?  What happens if I buy a stock and sell within 30 days at a loss, and never buy back the stock again.. I guess should be ok to claim the loss (as I used to) ?